diff options
| author | Andrey V. Elsukov <ae@FreeBSD.org> | 2018-04-20 09:57:31 +0000 |
|---|---|---|
| committer | Andrey V. Elsukov <ae@FreeBSD.org> | 2018-04-20 09:57:31 +0000 |
| commit | 2b9600b4497b864e88321fafc4a1e288cac35354 (patch) | |
| tree | 0af73ae71ffccaa180e767b1c9d224659e02a199 /sys/net/bpf.c | |
| parent | d83f17e5f9f2aae30c1ac5f71f11804fa9cbe7be (diff) | |
Notes
Diffstat (limited to 'sys/net/bpf.c')
| -rw-r--r-- | sys/net/bpf.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 0927b3de2f4f3..b3b5c6a1df2c5 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -98,6 +98,10 @@ __FBSDID("$FreeBSD$"); MALLOC_DEFINE(M_BPF, "BPF", "BPF data"); +static struct bpf_if_ext dead_bpf_if = { + .bif_dlist = LIST_HEAD_INITIALIZER() +}; + struct bpf_if { #define bif_next bif_ext.bif_next #define bif_dlist bif_ext.bif_dlist @@ -2659,7 +2663,7 @@ bpfdetach(struct ifnet *ifp) */ BPFIF_WLOCK(bp); bp->bif_flags |= BPFIF_FLAG_DYING; - *bp->bif_bpf = NULL; + *bp->bif_bpf = (struct bpf_if *)&dead_bpf_if;; BPFIF_WUNLOCK(bp); CTR4(KTR_NET, "%s: sheduling free for encap %d (%p) for if %p", |
