From b64e18dc71fb7d566415f3a709040a837e009153 Mon Sep 17 00:00:00 2001 From: Henning Brauer Date: Fri, 11 Jul 2014 10:48:51 +0000 Subject: 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 --- sys/net/if_vlan.c | 4 ++-- 1 file 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 /* -- cgit v1.2.3