mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
ifnet: Remove dead code
Since change [1], if_bpf will not be detached by the interface departure eventhandler and will not be NULL. Then the logic to re-attach if_bpf becomes dead and serves no purpose any more. This partially reverts commit05fc416403. 1.9ce40d321dbpf: Fix incorrect cleanup Reviewed by: kp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D45599
This commit is contained in:
parent
4ca4a3b1c8
commit
9738277b5c
1 changed files with 0 additions and 18 deletions
18
sys/net/if.c
18
sys/net/if.c
|
|
@ -1265,20 +1265,8 @@ finish_vnet_shutdown:
|
|||
static int
|
||||
if_vmove(struct ifnet *ifp, struct vnet *new_vnet)
|
||||
{
|
||||
#ifdef DEV_BPF
|
||||
u_int bif_dlt, bif_hdrlen;
|
||||
#endif
|
||||
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
|
||||
* mark as dead etc. so that the ifnet can be reattached later.
|
||||
|
|
@ -1300,12 +1288,6 @@ if_vmove(struct ifnet *ifp, struct vnet *new_vnet)
|
|||
*/
|
||||
CURVNET_SET_QUIET(new_vnet);
|
||||
if_attach_internal(ifp, true);
|
||||
|
||||
#ifdef DEV_BPF
|
||||
if (ifp->if_bpf == NULL)
|
||||
bpfattach(ifp, bif_dlt, bif_hdrlen);
|
||||
#endif
|
||||
|
||||
CURVNET_RESTORE();
|
||||
return (0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue