diff options
author | brian <brian@FreeBSD.org> | 1999-10-21 00:19:33 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1999-10-21 00:19:33 +0000 |
commit | 113b2d57884c5cd03bfc704ac94da6a27fa39255 (patch) | |
tree | 01c75d54f971bf168bfb5c9c59058c7999f83cf7 | |
parent | d94d9af9ee4e291f0592ce46f9e721f36655eb75 (diff) | |
download | FreeBSD-src-113b2d57884c5cd03bfc704ac94da6a27fa39255.zip FreeBSD-src-113b2d57884c5cd03bfc704ac94da6a27fa39255.tar.gz |
Don't go from PHASE_NETWORK to PHASE_ESTABLISH when we want to
re-open a device. The fact that we're in NETWORK phase indicates
that there are other links in DATALINK_OPEN and that we don't want
to stop using them.
-rw-r--r-- | usr.sbin/ppp/datalink.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/ppp/datalink.c b/usr.sbin/ppp/datalink.c index 9c27b56..80a5f5e 100644 --- a/usr.sbin/ppp/datalink.c +++ b/usr.sbin/ppp/datalink.c @@ -144,7 +144,8 @@ datalink_HangupDone(struct datalink *dl) datalink_StartDialTimer(dl, dl->cbcp.fsm.delay); cbcp_Down(&dl->cbcp); datalink_NewState(dl, DATALINK_OPENING); - if (bundle_Phase(dl->bundle) != PHASE_TERMINATE) + if (bundle_Phase(dl->bundle) == PHASE_DEAD || + bundle_Phase(dl->bundle) == PHASE_TERMINATE) bundle_NewPhase(dl->bundle, PHASE_ESTABLISH); } else if (dl->bundle->CleaningUp || (dl->physical->type == PHYS_DIRECT) || @@ -159,7 +160,8 @@ datalink_HangupDone(struct datalink *dl) datalink_StartDialTimer(dl, datalink_GetDialTimeout(dl)); } else { datalink_NewState(dl, DATALINK_OPENING); - if (bundle_Phase(dl->bundle) != PHASE_TERMINATE) + if (bundle_Phase(dl->bundle) == PHASE_DEAD || + bundle_Phase(dl->bundle) == PHASE_TERMINATE) bundle_NewPhase(dl->bundle, PHASE_ESTABLISH); if (dl->dial.tries < 0) { datalink_StartDialTimer(dl, dl->cfg.reconnect.timeout); |