summaryrefslogtreecommitdiffhomepage
path: root/dhcpv4/server4/server.go
diff options
context:
space:
mode:
authorRonald G. Minnich <rminnich@gmail.com>2020-01-24 04:50:56 +0000
committerinsomniac <insomniacslk@users.noreply.github.com>2020-01-24 08:40:53 +0000
commitf7072f72789b2bbd1309b0da2e0a2bb55dd21c59 (patch)
treeded9adcd3ba39a3befc64bbc7741c28d9d189ec3 /dhcpv4/server4/server.go
parent35a453c649b3219c57f4a90249826eceb9dc9a0b (diff)
Fix a compare in Serve() of IP4 Zero to use an IP4 address
Fixes, among other things, u-root pxeserver Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'dhcpv4/server4/server.go')
-rw-r--r--dhcpv4/server4/server.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/dhcpv4/server4/server.go b/dhcpv4/server4/server.go
index 8bf7924..9c1cee2 100644
--- a/dhcpv4/server4/server.go
+++ b/dhcpv4/server4/server.go
@@ -97,7 +97,7 @@ func (s *Server) Serve() error {
continue
}
// Set peer to broadcast if the client did not have an IP.
- if upeer.IP == nil || upeer.IP.Equal(net.IPv4zero) {
+ if upeer.IP == nil || upeer.IP.To4().Equal(net.IPv4zero) {
upeer = &net.UDPAddr{
IP: net.IPv4bcast,
Port: upeer.Port,