diff options
| author | Bjoern A. Zeeb <bz@FreeBSD.org> | 2019-11-24 23:21:47 +0000 |
|---|---|---|
| committer | Bjoern A. Zeeb <bz@FreeBSD.org> | 2019-11-24 23:21:47 +0000 |
| commit | 3232273f4208f03910c8d1daa64df3ba2741e128 (patch) | |
| tree | 3a78dd5191bc20c055be43f5730277e7633dcc84 /sys/net/if.c | |
| parent | b39d851dcbf0d19b6c97f77b402511041e66ab20 (diff) | |
Notes
Diffstat (limited to 'sys/net/if.c')
| -rw-r--r-- | sys/net/if.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index aaff4c6e2bf1e..d2cd2022fff48 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -32,6 +32,7 @@ * $FreeBSD$ */ +#include "opt_bpf.h" #include "opt_inet6.h" #include "opt_inet.h" @@ -1260,16 +1261,20 @@ static void if_vmove(struct ifnet *ifp, struct vnet *new_vnet) { struct if_clone *ifc; +#ifdef DEV_BPF u_int bif_dlt, bif_hdrlen; +#endif void *old; int rc; +#ifdef DEV_BPF /* * if_detach_internal() will call the eventhandler to notify * interface departure. That will detach if_bpf. We need to * safe the dlt and hdrlen so we can re-attach it later. */ bpf_get_bp_params(ifp->if_bpf, &bif_dlt, &bif_hdrlen); +#endif /* * Detach from current vnet, but preserve LLADDR info, do not @@ -1316,8 +1321,10 @@ if_vmove(struct ifnet *ifp, struct vnet *new_vnet) if_attach_internal(ifp, 1, ifc); +#ifdef DEV_BPF if (ifp->if_bpf == NULL) bpfattach(ifp, bif_dlt, bif_hdrlen); +#endif CURVNET_RESTORE(); } |
