diff options
| author | Hiroki Sato <hrs@FreeBSD.org> | 2015-03-03 04:28:19 +0000 |
|---|---|---|
| committer | Hiroki Sato <hrs@FreeBSD.org> | 2015-03-03 04:28:19 +0000 |
| commit | 8d5607593905b7b7e8f4082c49da10f2b0cb1a6d (patch) | |
| tree | dbfed69d93fc9ca56c58780ccbd6510ccef53982 /sys/netinet6 | |
| parent | 429b844ba6082354560e9423f3630be86aca88ff (diff) | |
Notes
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 e5b7af656617..4a080e5d9927 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 |
