From 51973a4e3001794e87c725226ed515c68957a815 Mon Sep 17 00:00:00 2001 From: knakahara Date: Thu, 20 Jul 2017 02:34:24 +0000 Subject: [PATCH] fix panic when PPPOE_DEBUG enabled. implemented by s-yamaguchi@IIJ, thanks. XXX need pullup to -8 branch --- sys/net/if_pppoe.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/net/if_pppoe.c b/sys/net/if_pppoe.c index 25872740b388..c96e41166f9c 100644 --- a/sys/net/if_pppoe.c +++ b/sys/net/if_pppoe.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_pppoe.c,v 1.125 2017/02/07 02:33:54 ozaki-r Exp $ */ +/* $NetBSD: if_pppoe.c,v 1.126 2017/07/20 02:34:24 knakahara Exp $ */ /*- * Copyright (c) 2002, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.125 2017/02/07 02:33:54 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.126 2017/07/20 02:34:24 knakahara Exp $"); #ifdef _KERNEL_OPT #include "pppoe.h" @@ -1366,7 +1366,6 @@ pppoe_send_padi(struct pppoe_softc *sc) } #ifdef PPPOE_DEBUG - p += sizeof sc; if (p - mtod(m0, uint8_t *) != len + PPPOE_HEADERLEN) panic("pppoe_send_padi: garbled output len, should be %ld, is %ld", (long)(len + PPPOE_HEADERLEN), (long)(p - mtod(m0, uint8_t *))); @@ -1666,7 +1665,6 @@ pppoe_send_padr(struct pppoe_softc *sc) } #ifdef PPPOE_DEBUG - p += sizeof sc; if (p - mtod(m0, uint8_t *) != len + PPPOE_HEADERLEN) panic("pppoe_send_padr: garbled output len, should be %ld, is %ld", (long)(len + PPPOE_HEADERLEN), (long)(p - mtod(m0, uint8_t *)));