diff options
author | hrs <hrs@FreeBSD.org> | 2015-03-03 04:28:19 +0000 |
---|---|---|
committer | hrs <hrs@FreeBSD.org> | 2015-03-03 04:28:19 +0000 |
commit | 09859de9fa153dc49e19f3b7628f7980b34febee (patch) | |
tree | dbfed69d93fc9ca56c58780ccbd6510ccef53982 /sys/netinet6 | |
parent | aeb0c6939be13712f8d59edbd23733dccdf7fcf6 (diff) | |
download | FreeBSD-src-09859de9fa153dc49e19f3b7628f7980b34febee.zip FreeBSD-src-09859de9fa153dc49e19f3b7628f7980b34febee.tar.gz |
Nonce has to be non-NULL for DAD even if net.inet6.ip6.dad_enhanced=0.
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/nd6_nbr.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c index e5b7af6..4a080e5 100644 --- a/sys/netinet6/nd6_nbr.c +++ b/sys/netinet6/nd6_nbr.c @@ -1528,7 +1528,6 @@ nd6_dad_ns_output(struct dadq *dp, struct ifaddr *ifa) { struct in6_ifaddr *ia = (struct in6_ifaddr *)ifa; struct ifnet *ifp = ifa->ifa_ifp; - uint8_t *nonce; int i; dp->dad_ns_tcount++; @@ -1543,7 +1542,6 @@ nd6_dad_ns_output(struct dadq *dp, struct ifaddr *ifa) if (V_dad_enhanced != 0) { for (i = 0; i < ND_OPT_NONCE_LEN32; i++) dp->dad_nonce[i] = arc4random(); - nonce = (uint8_t *)&dp->dad_nonce[0]; /* * XXXHRS: Note that in the case that * DupAddrDetectTransmits > 1, multiple NS messages with @@ -1552,9 +1550,9 @@ nd6_dad_ns_output(struct dadq *dp, struct ifaddr *ifa) * the latest nonce on the sender side. Practically it * should work well in almost all cases. */ - } else - nonce = NULL; - nd6_ns_output(ifp, NULL, &ia->ia_addr.sin6_addr, NULL, nonce); + } + nd6_ns_output(ifp, NULL, &ia->ia_addr.sin6_addr, NULL, + (uint8_t *)&dp->dad_nonce[0]); } static void |