aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2019-10-14 21:18:37 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2019-10-14 21:18:37 +0000
commit416a1d1e702553c0ff29c08b912d77b3d927184f (patch)
tree12cb981e39ac50fc5da4cff3d421d0a250affac5
parentd23e252dfa6f2133e95650a18858dfe3276447ef (diff)
downloadsrc-416a1d1e702553c0ff29c08b912d77b3d927184f.tar.gz
src-416a1d1e702553c0ff29c08b912d77b3d927184f.zip
if_delmulti() is never called without ifp argument, assert this instead
of doing a useless search through interfaces.
Notes
Notes: svn path=/head/; revision=353522
-rw-r--r--sys/net/if.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index 9610fd69ecb6..1d19b1cf9de1 100644
--- a/sys/net/if.c
+++ b/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;