Don't ``down'' all NCPs when the last LCP reaches TLD. Instead,
authorbrian <brian@openbsd.org>
Sun, 2 Apr 2000 01:36:24 +0000 (01:36 +0000)
committerbrian <brian@openbsd.org>
Sun, 2 Apr 2000 01:36:24 +0000 (01:36 +0000)
wait for bundle_LinkClosed() to be called.  This allows the correct
redial decision to be made (un-breaking ``set redial'').

usr.sbin/ppp/ppp/bundle.c

index 5b27165..8089d61 100644 (file)
@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *     $OpenBSD: bundle.c,v 1.33 2000/04/02 01:36:23 brian Exp $
+ *     $OpenBSD: bundle.c,v 1.34 2000/04/02 01:36:24 brian Exp $
  */
 
 #include <sys/param.h>
@@ -309,7 +309,6 @@ bundle_LayerFinish(void *v, struct fsm *fp)
 {
   /* The given fsm is now down (fp cannot be NULL)
    *
-   * If it's the last LCP, fsm_Down all NCPs
    * If it's the last NCP, fsm_Close all LCPs
    */
 
@@ -322,18 +321,12 @@ bundle_LayerFinish(void *v, struct fsm *fp)
     for (dl = bundle->links; dl; dl = dl->next)
       datalink_Close(dl, CLOSE_STAYDOWN);
     fsm2initial(fp);
-  } else if (fp->proto == PROTO_LCP) {
-    int others_active;
-
-    others_active = 0;
-    for (dl = bundle->links; dl; dl = dl->next)
-      if (fp != &dl->physical->link.lcp.fsm &&
-          dl->state != DATALINK_CLOSED && dl->state != DATALINK_HANGUP)
-        others_active++;
-
-    if (!others_active)
-      fsm2initial(&bundle->ncp.ipcp.fsm);
   }
+  /*
+   * If it's an LCP, don't try to murder any NCPs, let bundle_LinkClosed()
+   * do that side of things (at a time when a call to fsm2initial() on the
+   * NCP isn't going to take charge of bringing down this link).
+   */
 }
 
 int