Date: Tue, 3 Mar 2015 04:28:20 +0000 (UTC) From: Hiroki Sato <hrs@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r279559 - head/sys/netinet6 Message-ID: <201503030428.t234SKbi026032@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hrs Date: Tue Mar 3 04:28:19 2015 New Revision: 279559 URL: https://svnweb.freebsd.org/changeset/base/279559 Log: Nonce has to be non-NULL for DAD even if net.inet6.ip6.dad_enhanced=0. Modified: head/sys/netinet6/nd6_nbr.c Modified: head/sys/netinet6/nd6_nbr.c ============================================================================== --- head/sys/netinet6/nd6_nbr.c Tue Mar 3 02:46:59 2015 (r279558) +++ head/sys/netinet6/nd6_nbr.c Tue Mar 3 04:28:19 2015 (r279559) @@ -1528,7 +1528,6 @@ nd6_dad_ns_output(struct dadq *dp, struc { 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, struc 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, struc * 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201503030428.t234SKbi026032>