Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net unset IFF_PROMISC at bpf_detach()
details: https://anonhg.NetBSD.org/src/rev/dc05d474efaf
branches: trunk
changeset: 984619:dc05d474efaf
user: yamaguchi <yamaguchi%NetBSD.org@localhost>
date: Wed Jul 14 06:50:22 2021 +0000
description:
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.
diffstat:
sys/net/bpf.c | 5 ++---
sys/net/if_vlan.c | 6 ++----
2 files changed, 4 insertions(+), 7 deletions(-)
diffs (53 lines):
diff -r 5ee39e42a7fe -r dc05d474efaf sys/net/bpf.c
--- a/sys/net/bpf.c Wed Jul 14 06:35:59 2021 +0000
+++ b/sys/net/bpf.c Wed Jul 14 06:50:22 2021 +0000
@@ -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 @@
* 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;
diff -r 5ee39e42a7fe -r dc05d474efaf sys/net/if_vlan.c
--- a/sys/net/if_vlan.c Wed Jul 14 06:35:59 2021 +0000
+++ b/sys/net/if_vlan.c Wed Jul 14 06:50:22 2021 +0000
@@ -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 @@
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);
Home |
Main Index |
Thread Index |
Old Index