Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Mar 2017 00:50:40 -0700
From:      Ayaka Koshibe <akoshibe@gmail.com>
To:        freebsd-net@freebsd.org
Subject:   BPF departure handler and interface renaming
Message-ID:  <CAA-4d9SPQu7puFC8JaaOJ2cnV-6qsk2ZjMUPvfA9%2B%2BuYDDp%2BjA@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAA-4d9SPQu7puFC8JaaOJ2cnV-6qsk2ZjMUPvfA9%2B%2BuYDDp%2BjA>