From 5de001443e0d0c04131e682bfb3f032db0ddf760 Mon Sep 17 00:00:00 2001 From: brian Date: Sun, 2 Apr 2000 01:36:25 +0000 Subject: Don't ``down'' all NCPs when the last LCP reaches TLD. Instead, 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 | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/ppp/ppp/bundle.c b/usr.sbin/ppp/ppp/bundle.c index 5b271653a3a..8089d61544a 100644 --- a/usr.sbin/ppp/ppp/bundle.c +++ b/usr.sbin/ppp/ppp/bundle.c @@ -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 @@ -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 -- cgit v1.2.3