summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_pppoe.c17
-rw-r--r--sys/net/if_sppp.h3
-rw-r--r--sys/net/if_spppsubr.c6
3 files changed, 13 insertions, 13 deletions
diff --git a/sys/net/if_pppoe.c b/sys/net/if_pppoe.c
index fd912acd704..440b8555ccf 100644
--- a/sys/net/if_pppoe.c
+++ b/sys/net/if_pppoe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_pppoe.c,v 1.56 2016/05/30 23:30:11 sthen Exp $ */
+/* $OpenBSD: if_pppoe.c,v 1.57 2016/06/14 20:44:43 sthen Exp $ */
/* $NetBSD: if_pppoe.c,v 1.51 2003/11/28 08:56:48 keihan Exp $ */
/*
@@ -163,7 +163,7 @@ static void pppoe_timeout(void *);
/* sending actual protocol control packets */
static int pppoe_send_padi(struct pppoe_softc *);
static int pppoe_send_padr(struct pppoe_softc *);
-static int pppoe_send_padt(unsigned int, u_int, const u_int8_t *);
+static int pppoe_send_padt(unsigned int, u_int, const u_int8_t *, u_int8_t);
/* raw output */
static int pppoe_output(struct pppoe_softc *, struct mbuf *);
@@ -696,7 +696,7 @@ pppoe_data_input(struct mbuf *m)
#ifdef PPPOE_TERM_UNKNOWN_SESSIONS
printf("pppoe (data): input for unknown session 0x%x, sending PADT\n",
session);
- pppoe_send_padt(m->m_pkthdr.ph_ifidx, session, shost);
+ pppoe_send_padt(m->m_pkthdr.ph_ifidx, session, shost, 0);
#endif
goto drop;
}
@@ -1011,7 +1011,7 @@ pppoe_send_padi(struct pppoe_softc *sc)
m0 = pppoe_get_mbuf(len + PPPOE_HEADERLEN); /* header len + payload len */
if (m0 == NULL)
return (ENOBUFS);
- m0->m_pkthdr.pf.prio = SPPP_CTL_PRIO;
+ m0->m_pkthdr.pf.prio = sc->sc_sppp.pp_if.if_llprio;
/* fill in pkt */
p = mtod(m0, u_int8_t *);
@@ -1170,7 +1170,8 @@ pppoe_disconnect(struct pppoe_softc *sc)
PPPOEDEBUG(("%s: disconnecting\n",
sc->sc_sppp.pp_if.if_xname));
err = pppoe_send_padt(sc->sc_eth_ifidx,
- sc->sc_session, (const u_int8_t *)&sc->sc_dest);
+ sc->sc_session, (const u_int8_t *)&sc->sc_dest,
+ sc->sc_sppp.pp_if.if_llprio);
}
/* cleanup softc */
@@ -1238,7 +1239,7 @@ pppoe_send_padr(struct pppoe_softc *sc)
m0 = pppoe_get_mbuf(len + PPPOE_HEADERLEN);
if (m0 == NULL)
return (ENOBUFS);
- m0->m_pkthdr.pf.prio = SPPP_CTL_PRIO;
+ m0->m_pkthdr.pf.prio = sc->sc_sppp.pp_if.if_llprio;
p = mtod(m0, u_int8_t *);
PPPOE_ADD_HEADER(p, PPPOE_CODE_PADR, 0, len);
@@ -1285,7 +1286,7 @@ pppoe_send_padr(struct pppoe_softc *sc)
/* Send a PADT packet. */
static int
-pppoe_send_padt(unsigned int ifidx, u_int session, const u_int8_t *dest)
+pppoe_send_padt(unsigned int ifidx, u_int session, const u_int8_t *dest, u_int8_t prio)
{
struct ether_header *eh;
struct sockaddr dst;
@@ -1302,7 +1303,7 @@ pppoe_send_padt(unsigned int ifidx, u_int session, const u_int8_t *dest)
if_put(eth_if);
return (ENOBUFS);
}
- m0->m_pkthdr.pf.prio = SPPP_CTL_PRIO;
+ m0->m_pkthdr.pf.prio = prio;
p = mtod(m0, u_int8_t *);
PPPOE_ADD_HEADER(p, PPPOE_CODE_PADT, session, 0);
diff --git a/sys/net/if_sppp.h b/sys/net/if_sppp.h
index ea8bfcb9516..2fb04a1e15e 100644
--- a/sys/net/if_sppp.h
+++ b/sys/net/if_sppp.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_sppp.h,v 1.24 2016/05/30 23:30:11 sthen Exp $ */
+/* $OpenBSD: if_sppp.h,v 1.25 2016/06/14 20:44:43 sthen Exp $ */
/* $NetBSD: if_sppp.h,v 1.2.2.1 1999/04/04 06:57:39 explorer Exp $ */
/*
@@ -56,7 +56,6 @@ enum ppp_phase {
#define AUTHMAXLEN 256 /* including terminating '\0' */
#define AUTHCHALEN 16 /* length of the challenge we send */
-#define SPPP_CTL_PRIO 7 /* priority to use for control packets */
/*
* Definitions to pass struct sppp data down into the kernel using the
diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c
index 181739b9940..b4ea8f6dec6 100644
--- a/sys/net/if_spppsubr.c
+++ b/sys/net/if_spppsubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_spppsubr.c,v 1.153 2016/05/30 23:30:10 sthen Exp $ */
+/* $OpenBSD: if_spppsubr.c,v 1.154 2016/06/14 20:44:43 sthen Exp $ */
/*
* Synchronous PPP link level subroutines.
*
@@ -914,7 +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;
+ m->m_pkthdr.pf.prio = sp->pp_if.if_llprio;
*mtod(m, u_int16_t *) = htons(proto);
lh = (struct lcp_header *)(mtod(m, u_int8_t *) + 2);
@@ -3992,7 +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;
+ m->m_pkthdr.pf.prio = sp->pp_if.if_llprio;
*mtod(m, u_int16_t *) = htons(cp->proto);
lh = (struct lcp_header *)(mtod(m, u_int8_t *) + 2);