diff options
author | Christian Weisgerber <naddy@cvs.openbsd.org> | 2008-11-09 15:08:27 +0000 |
---|---|---|
committer | Christian Weisgerber <naddy@cvs.openbsd.org> | 2008-11-09 15:08:27 +0000 |
commit | 19e72e3b9f3138440f80b79260f2adaee85eae40 (patch) | |
tree | 291a75bc288930e303d106f2c4b3e8fb865415a0 /sys/dev/pci/if_nfe.c | |
parent | be7cd0fdfd40b4f306a204fdbb31aa7cdd7efec5 (diff) |
Introduce bpf_mtap_ether(), which for the benefit of bpf listeners
creates the VLAN encapsulation from the tag stored in the mbuf
header. Idea from FreeBSD, input from claudio@ and canacar@.
Switch all hardware VLAN enabled drivers to the new function.
ok claudio@
Diffstat (limited to 'sys/dev/pci/if_nfe.c')
-rw-r--r-- | sys/dev/pci/if_nfe.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/pci/if_nfe.c b/sys/dev/pci/if_nfe.c index 6a3234b0797..133f0b7ed9d 100644 --- a/sys/dev/pci/if_nfe.c +++ b/sys/dev/pci/if_nfe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_nfe.c,v 1.85 2008/10/28 05:53:20 brad Exp $ */ +/* $OpenBSD: if_nfe.c,v 1.86 2008/11/09 15:08:26 naddy Exp $ */ /*- * Copyright (c) 2006, 2007 Damien Bergamini <damien.bergamini@free.fr> @@ -813,7 +813,7 @@ nfe_rxeof(struct nfe_softc *sc) #if NBPFILTER > 0 if (ifp->if_bpf) - bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_IN); + bpf_mtap_ether(ifp->if_bpf, m, BPF_DIRECTION_IN); #endif ifp->if_ipackets++; ether_input_mbuf(ifp, m); @@ -1048,7 +1048,7 @@ nfe_start(struct ifnet *ifp) #if NBPFILTER > 0 if (ifp->if_bpf != NULL) - bpf_mtap(ifp->if_bpf, m0, BPF_DIRECTION_OUT); + bpf_mtap_ether(ifp->if_bpf, m0, BPF_DIRECTION_OUT); #endif } if (sc->txq.cur == old) /* nothing sent */ |