diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2018-04-03 02:52:51 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2018-04-03 02:52:51 +0000 |
commit | d48543fb0a0c6040beeddcb139c4cbddec8c91eb (patch) | |
tree | 8108a5c34437645c6e3f13c7764cb6a5477776d6 /sys/net/if_vlan.c | |
parent | 5fe8388a36276d028b9c3be9ccb6694ba21d1177 (diff) |
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@
Diffstat (limited to 'sys/net/if_vlan.c')
-rw-r--r-- | sys/net/if_vlan.c | 5 |
1 files changed, 3 insertions, 2 deletions
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; |