diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2014-07-11 10:48:51 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2014-07-11 10:48:51 +0000 |
commit | b64e18dc71fb7d566415f3a709040a837e009153 (patch) | |
tree | cd3df41caddab7c7bbfca4d8322f44c1bf8a0064 | |
parent | 33821af43d520a2d318b8c171eee60b04d87f843 (diff) |
switch from bpf_mtap to the shiny new bpf_mtap_stripvlan.
bpf listeners on a vlan interface don't expect to see a vlan header (you
expect those on the underlaying if). since we no longer prepend an ethernet
header to later throw it away and prepend an ether_vlan_header, we prepend
a ether_vlan_header right away. to unconfuse bpf listeners we need to cut
the 4 extra bytes out, which is what bpf_mtap_stripvlan does.
problem noticed by dlg with dhcrelay, ok benno dlg
-rw-r--r-- | sys/net/if_vlan.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index 9f5aca88b33..15a03d8a134 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vlan.c,v 1.106 2014/07/09 09:30:49 henning Exp $ */ +/* $OpenBSD: if_vlan.c,v 1.107 2014/07/11 10:48:50 henning Exp $ */ /* * Copyright 1998 Massachusetts Institute of Technology @@ -213,7 +213,7 @@ vlan_start(struct ifnet *ifp) #if NBPFILTER > 0 if (ifp->if_bpf) - bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_OUT); + bpf_mtap_stripvlan(ifp->if_bpf, m, BPF_DIRECTION_OUT); #endif /* |