From 0ca6f91b847ff8373ea39887c609acdd7b7b1d9a Mon Sep 17 00:00:00 2001 From: Brian Somers Date: Tue, 6 Apr 1999 14:48:10 +0000 Subject: [PATCH] When going from DATALINK_HANGUP directly to DATALINK_OPENING, don't forget to change phase to ESTABLISH if we're currently TERMINATE'ing. Helped locate by: Chuck Robey --- usr.sbin/ppp/datalink.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/usr.sbin/ppp/datalink.c b/usr.sbin/ppp/datalink.c index 11f3b3b2caeb..ea1a3d8ae67b 100644 --- a/usr.sbin/ppp/datalink.c +++ b/usr.sbin/ppp/datalink.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: datalink.c,v 1.35 1999/03/04 17:42:15 brian Exp $ + * $Id: datalink.c,v 1.36 1999/04/05 21:52:10 brian Exp $ */ #include @@ -144,6 +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) + bundle_NewPhase(dl->bundle, PHASE_ESTABLISH); } else if (dl->bundle->CleaningUp || (dl->physical->type == PHYS_DIRECT) || ((!dl->dial.tries || (dl->dial.tries < 0 && !dl->reconnect_tries)) && @@ -157,6 +159,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) + bundle_NewPhase(dl->bundle, PHASE_ESTABLISH); if (dl->dial.tries < 0) { datalink_StartDialTimer(dl, dl->cfg.reconnect.timeout); dl->dial.tries = dl->cfg.dial.max;