vlan(4) set's up the vlan tag with the right prio, so bpf shouldn't have
to do it and overwrite it.
ok?
Index: bpf.c
===================================================================
RCS file: /cvs/src/sys/net/bpf.c,v
retrieving revision 1.170
diff -u -p -r1.170 bpf.c
--- bpf.c 13 Jul 2018 08:51:15 -0000 1.170
+++ bpf.c 19 Nov 2018 21:55:05 -0000
@@ -1406,7 +1406,6 @@ bpf_mtap_ether(caddr_t arg, const struct
#if NVLAN > 0
struct ether_vlan_header evh;
struct m_hdr mh;
- uint8_t prio;
if ((m->m_flags & M_VLANTAG) == 0)
#endif
@@ -1417,15 +1416,10 @@ bpf_mtap_ether(caddr_t arg, const struct
#if NVLAN > 0
KASSERT(m->m_len >= ETHER_HDR_LEN);
- prio = m->m_pkthdr.pf.prio;
- if (prio <= 1)
- prio = !prio;
-
memcpy(&evh, mtod(m, char *), ETHER_HDR_LEN);
evh.evl_proto = evh.evl_encap_proto;
evh.evl_encap_proto = htons(ETHERTYPE_VLAN);
- evh.evl_tag = htons(m->m_pkthdr.ether_vtag |
- (prio << EVL_PRIO_BITS));
+ evh.evl_tag = htons(m->m_pkthdr.ether_vtag);
mh.mh_flags = 0;
mh.mh_data = m->m_data + ETHER_HDR_LEN;