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 <holger@freyther.de>
MFC after:	3 days
This commit is contained in:
Mark Johnston 2014-12-11 00:41:54 +00:00
parent 7c1e17e76e
commit 97712e3efc
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=275695

View File

@ -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