vlan: do not protect PCP write with the sysctl

pf will unconditionally "set prio", so this will fail if the
sysctl is off.  The sysctl, however, introduces a side-effect
so we would rather keep the default behaviour.  The allocation
slowdown is already taking place, so this in the worst case
only adds a list traversal / lookup.

PR: https://forum.opnsense.org/index.php?topic=6714.0
This commit is contained in:
Franco Fichtner 2017-12-30 10:09:06 +01:00
parent 5c70e2a2a8
commit dabc3cf4ef

View file

@ -1102,7 +1102,7 @@ vlan_transmit(struct ifnet *ifp, struct mbuf *m)
* knows how to find the VLAN tag to use, so we attach a
* packet tag that holds it.
*/
if (vlan_mtag_pcp && (mtag = m_tag_locate(m, MTAG_8021Q,
if ((mtag = m_tag_locate(m, MTAG_8021Q,
MTAG_8021Q_PCP_OUT, NULL)) != NULL)
tag = EVL_MAKETAG(ifv->ifv_vid, *(uint8_t *)(mtag + 1), 0);
else