Source-Changes-HG archive

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

[src/trunk]: src/sys/net Added a NULL check for parent interface of pppoe



details:   https://anonhg.NetBSD.org/src/rev/da9eb2ce9f8f
branches:  trunk
changeset: 1020470:da9eb2ce9f8f
user:      yamaguchi <yamaguchi%NetBSD.org@localhost>
date:      Tue Apr 13 04:57:15 2021 +0000

description:
Added a NULL check for parent interface of pppoe

diffstat:

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

diffs (27 lines):

diff -r 4d4fe44e8e22 -r da9eb2ce9f8f sys/net/if_pppoe.c
--- a/sys/net/if_pppoe.c        Tue Apr 13 04:53:22 2021 +0000
+++ b/sys/net/if_pppoe.c        Tue Apr 13 04:57:15 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_pppoe.c,v 1.159 2021/04/13 04:53:22 yamaguchi Exp $ */
+/* $NetBSD: if_pppoe.c,v 1.160 2021/04/13 04:57:15 yamaguchi 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.159 2021/04/13 04:53:22 yamaguchi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_pppoe.c,v 1.160 2021/04/13 04:57:15 yamaguchi Exp $");
 
 #ifdef _KERNEL_OPT
 #include "pppoe.h"
@@ -533,7 +533,7 @@
 
        LIST_FOREACH(sc, &pppoe_softc_list, sc_list) {
                PPPOE_LOCK(sc, lock);
-               if (sc->sc_id == t) {
+               if (sc->sc_id == t && sc->sc_eth_if != NULL) {
                        break;
                }
                PPPOE_UNLOCK(sc);



Home | Main Index | Thread Index | Old Index