From: brian Date: Sun, 2 Apr 2000 01:36:24 +0000 (+0000) Subject: Don't ``down'' all NCPs when the last LCP reaches TLD. Instead, X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=c2ed3d8b3d419dbea229acbde2ed1a09cf777d0c;p=openbsd 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''). --- 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