diff options
Diffstat (limited to 'netboot/netconf.go')
-rw-r--r-- | netboot/netconf.go | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/netboot/netconf.go b/netboot/netconf.go index 60468a7..2ecf472 100644 --- a/netboot/netconf.go +++ b/netboot/netconf.go @@ -44,8 +44,17 @@ func GetNetConfFromPacketv6(d *dhcpv6.Message) (*NetConf, error) { for _, iaaddr := range iana.Options.Addresses() { netconf.Addresses = append(netconf.Addresses, AddrConf{ IPNet: net.IPNet{ - IP: iaaddr.IPv6Addr, - Mask: net.CIDRMask(64, 128), + IP: iaaddr.IPv6Addr, + + // This mask tells Linux which addresses we know to be + // "on-link" (i.e., reachable on this interface without + // having to talk to a router). + // + // Since DHCPv6 does not give us that information, we + // have to assume that no addresses are on-link. To do + // that, we use /128. (See also RFC 5942 Section 5, + // "Observed Incorrect Implementation Behavior".) + Mask: net.CIDRMask(128, 128), }, PreferredLifetime: iaaddr.PreferredLifetime, ValidLifetime: iaaddr.ValidLifetime, |