if_delmulti() is never called without ifp argument, assert this instead
of doing a useless search through interfaces.
This commit is contained in:
+1
-14
@@ -3614,21 +3614,8 @@ if_delmulti(struct ifnet *ifp, struct sockaddr *sa)
|
|||||||
{
|
{
|
||||||
struct ifmultiaddr *ifma;
|
struct ifmultiaddr *ifma;
|
||||||
int lastref;
|
int lastref;
|
||||||
#ifdef INVARIANTS
|
|
||||||
struct ifnet *oifp;
|
|
||||||
|
|
||||||
NET_EPOCH_ASSERT();
|
KASSERT(ifp, ("%s: NULL ifp", __func__));
|
||||||
|
|
||||||
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);
|
|
||||||
|
|
||||||
IF_ADDR_WLOCK(ifp);
|
IF_ADDR_WLOCK(ifp);
|
||||||
lastref = 0;
|
lastref = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user