From a3a964d2c2921cc710f183d8a35080959f84619f Mon Sep 17 00:00:00 2001 From: claudio Date: Thu, 2 Feb 2023 13:28:31 +0000 Subject: [PATCH] Use binary or to set the ether_vtag which makes the code the same as in the other case as argument to vlan_inject(). Result is the same. OK dlg@ kn@ mvs@ --- 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 42e09814397..07a302b3832 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vlan.c,v 1.210 2022/08/10 09:01:48 mvs Exp $ */ +/* $OpenBSD: if_vlan.c,v 1.211 2023/02/02 13:28:31 claudio Exp $ */ /* * Copyright 1998 Massachusetts Institute of Technology @@ -270,7 +270,7 @@ vlan_transmit(struct vlan_softc *sc, struct ifnet *ifp0, struct mbuf *m) */ if ((ifp0->if_capabilities & IFCAP_VLAN_HWTAGGING) && (sc->sc_type == ETHERTYPE_VLAN)) { - m->m_pkthdr.ether_vtag = sc->sc_tag + + m->m_pkthdr.ether_vtag = sc->sc_tag | (prio << EVL_PRIO_BITS); m->m_flags |= M_VLANTAG; } else { -- 2.20.1