Module Name: src Committed By: yamaguchi Date: Wed Jul 14 06:50:22 UTC 2021
Modified Files: src/sys/net: bpf.c if_vlan.c Log Message: unset IFF_PROMISC at bpf_detach() Doing "d->bd_promisc = 0" is that bpf_detach() does not call ifpromisc(ifp, 0). Currently, there is no reason for this behavior so that it is removed. In addition to the change, the workaround for it in vlan(4) is also removed. To generate a diff of this commit: cvs rdiff -u -r1.240 -r1.241 src/sys/net/bpf.c cvs rdiff -u -r1.158 -r1.159 src/sys/net/if_vlan.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/net/bpf.c diff -u src/sys/net/bpf.c:1.240 src/sys/net/bpf.c:1.241 --- src/sys/net/bpf.c:1.240 Wed Jun 9 15:44:15 2021 +++ src/sys/net/bpf.c Wed Jul 14 06:50:22 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: bpf.c,v 1.240 2021/06/09 15:44:15 martin Exp $ */ +/* $NetBSD: bpf.c,v 1.241 2021/07/14 06:50:22 yamaguchi Exp $ */ /* * Copyright (c) 1990, 1991, 1993 @@ -39,7 +39,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.240 2021/06/09 15:44:15 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.241 2021/07/14 06:50:22 yamaguchi Exp $"); #if defined(_KERNEL_OPT) #include "opt_bpf.h" @@ -2194,7 +2194,6 @@ _bpfdetach(struct ifnet *ifp) * Detach the descriptor from an interface now. * It will be free'ed later by close routine. */ - d->bd_promisc = 0; /* we can't touch device. */ bpf_detachd(d); mutex_exit(d->bd_mtx); goto again_d; Index: src/sys/net/if_vlan.c diff -u src/sys/net/if_vlan.c:1.158 src/sys/net/if_vlan.c:1.159 --- src/sys/net/if_vlan.c:1.158 Wed Jul 14 06:23:06 2021 +++ src/sys/net/if_vlan.c Wed Jul 14 06:50:22 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: if_vlan.c,v 1.158 2021/07/14 06:23:06 yamaguchi Exp $ */ +/* $NetBSD: if_vlan.c,v 1.159 2021/07/14 06:50:22 yamaguchi Exp $ */ /* * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. @@ -78,7 +78,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.158 2021/07/14 06:23:06 yamaguchi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_vlan.c,v 1.159 2021/07/14 06:50:22 yamaguchi Exp $"); #ifdef _KERNEL_OPT #include "opt_inet.h" @@ -701,8 +701,6 @@ vlan_unconfig_locked(struct ifvlan *ifv, KERNEL_UNLOCK_UNLESS_NET_MPSAFE(); #endif - if ((ifp->if_flags & IFF_PROMISC) != 0) - vlan_safe_ifpromisc_locked(ifp, 0); if_down_locked(ifp); ifp->if_capabilities = 0; mutex_enter(&ifv->ifv_lock);