if_delmulti() is never called without ifp argument, assert this instead
of doing a useless search through interfaces.
This commit is contained in:
parent
d23e252dfa
commit
416a1d1e70
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=353522
15
sys/net/if.c
15
sys/net/if.c
@ -3614,21 +3614,8 @@ if_delmulti(struct ifnet *ifp, struct sockaddr *sa)
|
||||
{
|
||||
struct ifmultiaddr *ifma;
|
||||
int lastref;
|
||||
#ifdef INVARIANTS
|
||||
struct ifnet *oifp;
|
||||
|
||||
NET_EPOCH_ASSERT();
|
||||
|
||||
CK_STAILQ_FOREACH(oifp, &V_ifnet, if_link)
|
||||
if (ifp == oifp)
|
||||
break;
|
||||
if (ifp != oifp)
|
||||
ifp = NULL;
|
||||
|
||||
KASSERT(ifp != NULL, ("%s: ifnet went away", __func__));
|
||||
#endif
|
||||
if (ifp == NULL)
|
||||
return (ENOENT);
|
||||
KASSERT(ifp, ("%s: NULL ifp", __func__));
|
||||
|
||||
IF_ADDR_WLOCK(ifp);
|
||||
lastref = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user