summaryrefslogtreecommitdiff
path: root/sys/net/if_spppsubr.c
diff options
context:
space:
mode:
authorStuart Henderson <sthen@cvs.openbsd.org>2016-05-30 23:30:12 +0000
committerStuart Henderson <sthen@cvs.openbsd.org>2016-05-30 23:30:12 +0000
commita76214f441401dc88bb5bf703141a83747c23b09 (patch)
tree7f2ab556bc1e176a4e13efc3efb79e387ad33f68 /sys/net/if_spppsubr.c
parent9551774c5914a67b6673a69282d874ff88ca99b3 (diff)
Set pppoe(4) control frames to high (NC, "network control")
priority. This is translated into an 802.1p priority tag when sent over a vlan interface, reducing the risk of them being crowded out by data packets on a busy link. Some users have problems with ISPs that place specific requirements on vlan priority (typically the packet header value must be '0', relating to priority 1). This diff doesn't fix that yet, but gives a single place to patch to change tags on control packets without affecting normal vlan priority operation on other interfaces. ok mikeb.
Diffstat (limited to 'sys/net/if_spppsubr.c')
-rw-r--r--sys/net/if_spppsubr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c
index d2ad8c5d80d..181739b9940 100644
--- a/sys/net/if_spppsubr.c
+++ b/sys/net/if_spppsubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_spppsubr.c,v 1.152 2016/05/02 22:15:49 jmatthew Exp $ */
+/* $OpenBSD: if_spppsubr.c,v 1.153 2016/05/30 23:30:10 sthen Exp $ */
/*
* Synchronous PPP link level subroutines.
*
@@ -914,6 +914,7 @@ sppp_cp_send(struct sppp *sp, u_short proto, u_char type,
return;
m->m_pkthdr.len = m->m_len = PKTHDRLEN + LCP_HEADER_LEN + len;
m->m_pkthdr.ph_ifidx = 0;
+ m->m_pkthdr.pf.prio = SPPP_CTL_PRIO;
*mtod(m, u_int16_t *) = htons(proto);
lh = (struct lcp_header *)(mtod(m, u_int8_t *) + 2);
@@ -3991,6 +3992,7 @@ sppp_auth_send(const struct cp *cp, struct sppp *sp,
if (! m)
return;
m->m_pkthdr.ph_ifidx = 0;
+ m->m_pkthdr.pf.prio = SPPP_CTL_PRIO;
*mtod(m, u_int16_t *) = htons(cp->proto);
lh = (struct lcp_header *)(mtod(m, u_int8_t *) + 2);