Use dead_bpf_if instead of bp_null.
This fixes a -Wunused error when DEV_BPF and NETGRAPH_BPF are not defined. Also remove a stray semicolon added in r332812. X-MFC with: r332812
This commit is contained in:
parent
4bc04c458e
commit
943580a700
@ -2663,7 +2663,7 @@ bpfdetach(struct ifnet *ifp)
|
||||
*/
|
||||
BPFIF_WLOCK(bp);
|
||||
bp->bif_flags |= BPFIF_FLAG_DYING;
|
||||
*bp->bif_bpf = (struct bpf_if *)&dead_bpf_if;;
|
||||
*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",
|
||||
@ -2982,13 +2982,13 @@ bpf_stats_sysctl(SYSCTL_HANDLER_ARGS)
|
||||
SYSINIT(bpfdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE,bpf_drvinit,NULL);
|
||||
|
||||
#else /* !DEV_BPF && !NETGRAPH_BPF */
|
||||
|
||||
/*
|
||||
* NOP stubs to allow bpf-using drivers to load and function.
|
||||
*
|
||||
* A 'better' implementation would allow the core bpf functionality
|
||||
* to be loaded at runtime.
|
||||
*/
|
||||
static struct bpf_if bp_null;
|
||||
|
||||
void
|
||||
bpf_tap(struct bpf_if *bp, u_char *pkt, u_int pktlen)
|
||||
@ -3016,7 +3016,7 @@ void
|
||||
bpfattach2(struct ifnet *ifp, u_int dlt, u_int hdrlen, struct bpf_if **driverp)
|
||||
{
|
||||
|
||||
*driverp = &bp_null;
|
||||
*driverp = (struct bpf_if *)&dead_bpf_if;
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
x
Reference in New Issue
Block a user