From owner-svn-src-head@FreeBSD.ORG Tue Mar 3 04:28:20 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 52B19979; Tue, 3 Mar 2015 04:28:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E1A119D9; Tue, 3 Mar 2015 04:28:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t234SKMo026033; Tue, 3 Mar 2015 04:28:20 GMT (envelope-from hrs@FreeBSD.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t234SKbi026032; Tue, 3 Mar 2015 04:28:20 GMT (envelope-from hrs@FreeBSD.org) Message-Id: <201503030428.t234SKbi026032@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hrs set sender to hrs@FreeBSD.org using -f From: Hiroki Sato Date: Tue, 3 Mar 2015 04:28:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r279559 - head/sys/netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2015 04:28:20 -0000 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