summaryrefslogtreecommitdiffhomepage
path: root/dhcpv6
diff options
context:
space:
mode:
authorChris K <chrisko@google.com>2019-09-24 21:45:41 -0700
committerinsomniac <insomniacslk@users.noreply.github.com>2019-09-25 11:11:11 +0100
commit8b87dd7716f621fbbfafc65f68f7ec016bebd73b (patch)
tree47c9f0cc3a06f7c298f81f7877c411337d603714 /dhcpv6
parentad2f215d2363b50bcbf2db0d89d20857d19fd816 (diff)
server6: allow nil IP in addition to unspecified
Signed-off-by: Chris Koch <chrisko@google.com>
Diffstat (limited to 'dhcpv6')
-rw-r--r--dhcpv6/server6/server.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/dhcpv6/server6/server.go b/dhcpv6/server6/server.go
index ac25076..1f4d8a0 100644
--- a/dhcpv6/server6/server.go
+++ b/dhcpv6/server6/server.go
@@ -164,7 +164,7 @@ func NewServer(ifname string, addr *net.UDPAddr, handler Handler, opt ...ServerO
if err := p.JoinGroup(iface, addr); err != nil {
return nil, err
}
- } else if addr.IP.IsUnspecified() && addr.Port == dhcpv6.DefaultServerPort {
+ } else if (addr.IP == nil || addr.IP.IsUnspecified()) && addr.Port == dhcpv6.DefaultServerPort {
// For wildcard addresses on the correct port, listen on both multicast
// addresses defined in the RFC as a "default" behaviour
for _, g := range []net.IP{dhcpv6.AllDHCPRelayAgentsAndServers, dhcpv6.AllDHCPServers} {