diff options
author | brian <brian@FreeBSD.org> | 2000-03-22 03:02:00 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2000-03-22 03:02:00 +0000 |
commit | 76f86d485000002b2f56a8e02c0dd23032423f40 (patch) | |
tree | 14899ec7613d80487a75558437bb3698bdac647b /usr.sbin/ppp/bundle.c | |
parent | 1ae09dfce5cca7fe20163d96d1c1d0461a948b6f (diff) | |
download | FreeBSD-src-76f86d485000002b2f56a8e02c0dd23032423f40.zip FreeBSD-src-76f86d485000002b2f56a8e02c0dd23032423f40.tar.gz |
If a links LCP FSM has reached TLF and it's the last link,
don't bother to re-initialise the NCPs. Instead wait for
bundle_LinkClosed() to be called - IFF it actually is called.
By initialising the NCPs at this point, ppp was recursing
back into the fsm_Down() routing for the link, and losing
track of the reason that the link was being brought down.
The end result was that ``set reconnect'' would never do
anything.
Patiently pointed out by: ru
Diffstat (limited to 'usr.sbin/ppp/bundle.c')
-rw-r--r-- | usr.sbin/ppp/bundle.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/usr.sbin/ppp/bundle.c b/usr.sbin/ppp/bundle.c index 5b5504c..6f4ec89 100644 --- a/usr.sbin/ppp/bundle.c +++ b/usr.sbin/ppp/bundle.c @@ -308,7 +308,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 */ @@ -321,18 +320,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 |