summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormvs <mvs@cvs.openbsd.org>2020-12-30 12:10:40 +0000
committermvs <mvs@cvs.openbsd.org>2020-12-30 12:10:40 +0000
commit9a671f5e98760d6b02c5d17b451518defb0d975d (patch)
tree35b2e760579d0281164b562c24ff121dd5248717
parentb18aadc29809b27bbd884d2515a338d080ba8168 (diff)
Convert the `off' argument of pppoe_dispatch_disc_pkt function to
local variable. This argument was always passed as 0. ok kn@
-rw-r--r--sys/net/if_pppoe.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/net/if_pppoe.c b/sys/net/if_pppoe.c
index eb08343200e..061aabd44ab 100644
--- a/sys/net/if_pppoe.c
+++ b/sys/net/if_pppoe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_pppoe.c,v 1.73 2020/09/13 11:00:40 kn Exp $ */
+/* $OpenBSD: if_pppoe.c,v 1.74 2020/12/30 12:10:39 mvs Exp $ */
/* $NetBSD: if_pppoe.c,v 1.51 2003/11/28 08:56:48 keihan Exp $ */
/*
@@ -149,7 +149,7 @@ struct niqueue pppoeinq = NIQUEUE_INITIALIZER(IFQ_MAXLEN, NETISR_PPPOE);
/* input routines */
static void pppoe_disc_input(struct mbuf *);
-static void pppoe_dispatch_disc_pkt(struct mbuf *, int);
+static void pppoe_dispatch_disc_pkt(struct mbuf *);
static void pppoe_data_input(struct mbuf *);
/* management routines */
@@ -357,7 +357,7 @@ pppoeintr(void)
}
/* Analyze and handle a single received packet while not in session state. */
-static void pppoe_dispatch_disc_pkt(struct mbuf *m, int off)
+static void pppoe_dispatch_disc_pkt(struct mbuf *m)
{
struct pppoe_softc *sc;
struct pppoehdr *ph;
@@ -367,7 +367,7 @@ static void pppoe_dispatch_disc_pkt(struct mbuf *m, int off)
const char *err_msg, *devname;
size_t ac_cookie_len;
size_t relay_sid_len;
- int noff, err, errortag;
+ int off, noff, err, errortag;
u_int16_t *max_payload;
u_int16_t tag, len;
u_int16_t session, plen;
@@ -377,6 +377,7 @@ static void pppoe_dispatch_disc_pkt(struct mbuf *m, int off)
err_msg = NULL;
devname = "pppoe";
+ off = 0;
errortag = 0;
if (m->m_len < sizeof(*eh)) {
@@ -653,7 +654,7 @@ pppoe_disc_input(struct mbuf *m)
/* avoid error messages if there is not a single pppoe instance */
if (!LIST_EMPTY(&pppoe_softc_list)) {
KASSERT(m->m_flags & M_PKTHDR);
- pppoe_dispatch_disc_pkt(m, 0);
+ pppoe_dispatch_disc_pkt(m);
} else
m_freem(m);
}