From d48543fb0a0c6040beeddcb139c4cbddec8c91eb Mon Sep 17 00:00:00 2001 From: David Gwynne Date: Tue, 3 Apr 2018 02:52:51 +0000 Subject: use link0 to use llprio in transmitted packets, regardless of mbuf prio. some ISPs now provide services over vlans, but require vlan packets going to the internet have their priority set to 1 (ie, 0 on the wire) or they will be dropped. configuring this on openbsd requires config in several places, eg, pf rules to set the prio on ip packets, llprio on the pppoe interface for it's management frames, and the llprio on the vlan interface if you're using dhclient on it. this has the side effect that you can no longer use priority queuing, and can be error prone to get right. using link0 to flatteng the priority for isp transit is simple to configure, and allows priority queuing. a man page update is coming. ok henning@ --- sys/net/if_vlan.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys/net') diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index ee3cd62f0dd..37f60b8fb01 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vlan.c,v 1.176 2018/02/19 08:59:52 mpi Exp $ */ +/* $OpenBSD: if_vlan.c,v 1.177 2018/04/03 02:52:50 dlg Exp $ */ /* * Copyright 1998 Massachusetts Institute of Technology @@ -261,9 +261,10 @@ vlan_start(struct ifqueue *ifq) bpf_mtap_ether(ifp->if_bpf, m, BPF_DIRECTION_OUT); #endif /* NBPFILTER > 0 */ + prio = ISSET(ifp->if_flags, IFF_LINK0) ? + ifp->if_llprio : m->m_pkthdr.pf.prio; /* IEEE 802.1p has prio 0 and 1 swapped */ - prio = m->m_pkthdr.pf.prio; if (prio <= 1) prio = !prio; -- cgit v1.2.3