Source-Changes-HG archive

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

[src/trunk]: src/sys/net We explicitly close LCP when going to state CLOSED, ...



details:   https://anonhg.NetBSD.org/src/rev/8095ca3239e3
branches:  trunk
changeset: 519037:8095ca3239e3
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Dec 10 00:22:21 2001 +0000

description:
We explicitly close LCP when going to state CLOSED, so we better open
it again when going from INITIAL to STARTING. This has been done for
passive or auto-conecting interfaces always, but not for permanent
ones.

This fixes session reestablishement for PPPoE interfaces without LINK1 set,
and probably also closes PR kern/11161.

Thanks to Jared D. McNeill and Ross Harvey for sugesting debug methology.

diffstat:

 sys/net/if_spppsubr.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r b386a016a301 -r 8095ca3239e3 sys/net/if_spppsubr.c
--- a/sys/net/if_spppsubr.c     Sun Dec 09 23:40:24 2001 +0000
+++ b/sys/net/if_spppsubr.c     Mon Dec 10 00:22:21 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_spppsubr.c,v 1.31 2001/12/08 19:46:39 martin Exp $   */
+/*     $NetBSD: if_spppsubr.c,v 1.32 2001/12/10 00:22:21 martin Exp $   */
 
 /*
  * Synchronous PPP/Cisco link level subroutines.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.31 2001/12/08 19:46:39 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.32 2001/12/10 00:22:21 martin Exp $");
 
 #include "opt_inet.h"
 #include "opt_ipx.h"
@@ -2006,6 +2006,10 @@
                        lcp.Open(sp);
                } else if (debug)
                        addlog("\n");
+       } else if ((ifp->if_flags & (IFF_AUTO | IFF_PASSIVE)) == 0 &&
+                  (sp->state[IDX_LCP] == STATE_INITIAL)) {
+                       ifp->if_flags |= IFF_RUNNING;
+                       lcp.Open(sp);
        }
 
        sppp_up_event(&lcp, sp);



Home | Main Index | Thread Index | Old Index