From owner-svn-src-head@FreeBSD.ORG Thu Dec 11 00:41:55 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8673EC05; Thu, 11 Dec 2014 00:41:55 +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 730D1E16; Thu, 11 Dec 2014 00:41:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sBB0ftxY030058; Thu, 11 Dec 2014 00:41:55 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sBB0ftwC030057; Thu, 11 Dec 2014 00:41:55 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201412110041.sBB0ftwC030057@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Thu, 11 Dec 2014 00:41:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r275695 - 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: Thu, 11 Dec 2014 00:41:55 -0000 Author: markj Date: Thu Dec 11 00:41:54 2014 New Revision: 275695 URL: https://svnweb.freebsd.org/changeset/base/275695 Log: Fix a bug in r266857: nd6_dad_find() must return NULL if it doesn't find a matching element in the DAD queue. Reported by: Holger Hans Peter Freyther MFC after: 3 days Modified: head/sys/netinet6/nd6_nbr.c Modified: head/sys/netinet6/nd6_nbr.c ============================================================================== --- head/sys/netinet6/nd6_nbr.c Thu Dec 11 00:25:26 2014 (r275694) +++ head/sys/netinet6/nd6_nbr.c Thu Dec 11 00:41:54 2014 (r275695) @@ -1210,11 +1210,12 @@ nd6_dad_find(struct ifaddr *ifa) TAILQ_FOREACH(dp, &V_dadq, dad_list) if (dp->dad_ifa == ifa) { refcount_acquire(&dp->dad_refcnt); - break; + DADQ_RUNLOCK(); + return (dp); } DADQ_RUNLOCK(); - return (dp); + return (NULL); } static void