Re: bpf_mtap_stripvlan

2014-07-10 Thread Henning Brauer
); + bpf_mtap_stripvlan(ifp-if_bpf, m, BPF_DIRECTION_OUT); #endif /* * Henning Brauer hb-openbsdt...@ml.bsws.de [2014-07-09 23:46]: so dlg noticed that tcpdump on vlan is now somewhat busted, specifically dhc* don't work on the any more. the reason is that bpf now sees the ether_vlan_header

Re: bpf_mtap_stripvlan

2014-07-10 Thread Stuart Henderson
if (ifp-if_bpf) - bpf_mtap(ifp-if_bpf, m, BPF_DIRECTION_OUT); + bpf_mtap_stripvlan(ifp-if_bpf, m, BPF_DIRECTION_OUT); #endif /* * Henning Brauer hb-openbsdt...@ml.bsws.de [2014-07-09 23:46]: so dlg noticed that tcpdump on vlan is now

Re: bpf_mtap_stripvlan

2014-07-10 Thread Paul de Weerd
On Thu, Jul 10, 2014 at 01:30:29PM +0100, Stuart Henderson wrote: | On 2014/07/10 13:11, Henning Brauer wrote: | I committed the bpf chunk, but nothing is using it yet. pls give the | if_vlan.c chunk a spin. | | I think weerd@ might need something similar for bridge for his tv... I'm testing

Re: bpf_mtap_stripvlan

2014-07-10 Thread Henning Brauer
* Stuart Henderson st...@openbsd.org [2014-07-10 14:30]: On 2014/07/10 13:11, Henning Brauer wrote: I committed the bpf chunk, but nothing is using it yet. pls give the if_vlan.c chunk a spin. I think weerd@ might need something similar for bridge for his tv... the f^(*$@)($#@ bridge needs

Re: bpf_mtap_stripvlan

2014-07-10 Thread Henning Brauer
* Paul de Weerd we...@weirdnet.nl [2014-07-10 14:33]: On Thu, Jul 10, 2014 at 01:30:29PM +0100, Stuart Henderson wrote: | On 2014/07/10 13:11, Henning Brauer wrote: | I committed the bpf chunk, but nothing is using it yet. pls give the | if_vlan.c chunk a spin. | I think weerd@ might need

bpf_mtap_stripvlan

2014-07-09 Thread Henning Brauer
@@ -1218,6 +1259,13 @@ void bpf_mtap(caddr_t arg, struct mbuf *m, u_int direction) { _bpf_mtap(arg, m, direction, NULL); +} + +/* like bpf_mtap, but strip the vlan header, leave regular ethernet hdr */ +void +bpf_mtap_stripvlan(caddr_t arg, struct mbuf *m, u_int direction) +{ + _bpf_mtap