Date: Mon, 14 Oct 2019 21:18:37 +0000 (UTC) From: Gleb Smirnoff <glebius@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r353522 - head/sys/net Message-ID: <201910142118.x9ELIblW000308@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: glebius Date: Mon Oct 14 21:18:37 2019 New Revision: 353522 URL: https://svnweb.freebsd.org/changeset/base/353522 Log: if_delmulti() is never called without ifp argument, assert this instead of doing a useless search through interfaces. Modified: head/sys/net/if.c Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Mon Oct 14 20:55:01 2019 (r353521) +++ head/sys/net/if.c Mon Oct 14 21:18:37 2019 (r353522) @@ -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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201910142118.x9ELIblW000308>