BPF departure handler and interface renaming
Ayaka Koshibe
akoshibe at gmail.com
Mon Mar 13 07:50:42 UTC 2017
Hi,
I had submitted a PR for a panic caused by Open vSwitch a while back:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=213015
It looks to be due to traffic being sent while a tap interface is
being renamed, during which if_bpf in the ifnet is set to null. The
following patch does stop the panic (it's also been added to the PR).
I see similar checks in some other departure handlers like lagg and
vxlan - so I'm wondering if this would be a sensible check here.
Thanks.
Index: net/bpf.c
===================================================================
--- net/bpf.c (revision 313973)
+++ net/bpf.c (working copy)
@@ -2678,6 +2678,9 @@
struct bpf_if *bp, *bp_temp;
int nmatched = 0;
+ if (ifp->if_flags & IFF_RENAMING)
+ return;
+
BPF_LOCK();
/*
* Find matching entries in free list.
More information about the freebsd-net
mailing list