Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net Fix stall on PPPOE_STATE_PADR_SENT when received spe...



details:   https://anonhg.NetBSD.org/src/rev/e5c117991115
branches:  trunk
changeset: 368887:e5c117991115
user:      knakahara <knakahara%NetBSD.org@localhost>
date:      Fri Aug 12 06:24:03 2022 +0000

description:
Fix stall on PPPOE_STATE_PADR_SENT when received specific PADO, ok'ed by yamaguchi@n.o.

When pppoe receives a PADO frame larger than mbuf cluster size,
pppoe_send_padr() fails forever.  So, the pppoe interface stall
on PPPOE_STATE_PADR_SENT until ifconfig down/up.
It should retry from PADI in such case.

diffstat:

 sys/net/if_pppoe.c |  5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diffs (26 lines):

diff -r ece89b017ff7 -r e5c117991115 sys/net/if_pppoe.c
--- a/sys/net/if_pppoe.c        Thu Aug 11 23:53:03 2022 +0000
+++ b/sys/net/if_pppoe.c        Fri Aug 12 06:24:03 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_pppoe.c,v 1.181 2022/05/23 21:46:12 andvar Exp $ */
+/* $NetBSD: if_pppoe.c,v 1.182 2022/08/12 06:24:03 knakahara Exp $ */
 
 /*
  * Copyright (c) 2002, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.181 2022/05/23 21:46:12 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.182 2022/08/12 06:24:03 knakahara Exp $");
 
 #ifdef _KERNEL_OPT
 #include "pppoe.h"
@@ -1615,7 +1615,6 @@
                        return;
                }
                if ((err = pppoe_send_padr(sc)) != 0) {
-                       sc->sc_padr_retried--;
                        pppoe_printf(sc,"failed to send PADR, error=%d", err);
                }
                callout_schedule(&sc->sc_timeout,



Home | Main Index | Thread Index | Old Index