summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/bundle.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2002-03-30 12:52:55 +0000
committerbrian <brian@FreeBSD.org>2002-03-30 12:52:55 +0000
commit631238220a5b5f952606b7e8cdd805b95ea1c17a (patch)
tree8f46e94d73b1705bd4b32a02305225bb47e33ab6 /usr.sbin/ppp/bundle.c
parent4aad533fbf9d1afeb10de8d0087049afdabd71b3 (diff)
downloadFreeBSD-src-631238220a5b5f952606b7e8cdd805b95ea1c17a.zip
FreeBSD-src-631238220a5b5f952606b7e8cdd805b95ea1c17a.tar.gz
Add a sprinkling of mp_Down() calls to ensure that we don't think that
the multi-link NCP is up when it isn't.
Diffstat (limited to 'usr.sbin/ppp/bundle.c')
-rw-r--r--usr.sbin/ppp/bundle.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.sbin/ppp/bundle.c b/usr.sbin/ppp/bundle.c
index 5280548..64cce9d 100644
--- a/usr.sbin/ppp/bundle.c
+++ b/usr.sbin/ppp/bundle.c
@@ -330,9 +330,11 @@ bundle_LayerDown(void *v, struct fsm *fp)
fp->link->name);
}
- if (!others_active)
+ if (!others_active) {
/* Down the NCPs. We don't expect to get fsm_Close()d ourself ! */
ncp2initial(&bundle->ncp);
+ mp_Down(&bundle->ncp.mp);
+ }
}
}
@@ -342,6 +344,7 @@ bundle_LayerFinish(void *v, struct fsm *fp)
/* The given fsm is now down (fp cannot be NULL)
*
* If it's the last NCP, fsm_Close all LCPs
+ * If it's the last NCP, bring any MP layer down
*/
struct bundle *bundle = (struct bundle *)v;
@@ -354,6 +357,7 @@ bundle_LayerFinish(void *v, struct fsm *fp)
if (dl->state == DATALINK_OPEN)
datalink_Close(dl, CLOSE_STAYDOWN);
fsm2initial(fp);
+ mp_Down(&bundle->ncp.mp);
}
}
@@ -400,6 +404,7 @@ bundle_Close(struct bundle *bundle, const char *name, int how)
ncp_Close(&bundle->ncp);
else {
ncp2initial(&bundle->ncp);
+ mp_Down(&bundle->ncp.mp);
for (dl = bundle->links; dl; dl = dl->next)
datalink_Close(dl, how);
}
@@ -934,6 +939,7 @@ bundle_LinkClosed(struct bundle *bundle, struct datalink *dl)
if (dl->physical->type != PHYS_AUTO) /* Not in -auto mode */
bundle_DownInterface(bundle);
ncp2initial(&bundle->ncp);
+ mp_Down(&bundle->ncp.mp);
bundle_NewPhase(bundle, PHASE_DEAD);
bundle_StopIdleTimer(bundle);
}
OpenPOWER on IntegriCloud