diff --git a/usr.sbin/ppp/lcp.c b/usr.sbin/ppp/lcp.c index d72679d4cdc1..85e9e73675c9 100644 --- a/usr.sbin/ppp/lcp.c +++ b/usr.sbin/ppp/lcp.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: lcp.c,v 1.36 1997/09/27 19:41:40 brian Exp $ + * $Id: lcp.c,v 1.37 1997/09/29 19:40:16 brian Exp $ * * TODO: * o Validate magic number received from peer. @@ -127,7 +127,7 @@ NewPhase(int new) CcpUp(); CcpOpen(); break; - case PHASE_DEAD: + case PHASE_TERMINATE: if (mode & MODE_DIRECT) Cleanup(EX_DEAD); if (mode & MODE_BACKGROUND && reconnectState != RECON_TRUE) @@ -350,6 +350,8 @@ LcpLayerFinish(struct fsm * fp) NewPhase(PHASE_DEAD); StopAllTimers(); (void) OsInterfaceDown(0); + /* We're down at last. Lets tell background and direct mode to get out */ + NewPhase(PHASE_TERMINATE); Prompt(); } @@ -376,7 +378,10 @@ LcpLayerDown(struct fsm * fp) StopAllTimers(); OsLinkdown(); LogPrintf(LogLCP, "LcpLayerDown\n"); - NewPhase(PHASE_TERMINATE); + /* + * OsLinkdown() brings CCP & IPCP down, then waits 'till we go from + * STOPPING to STOPPED. At this point, the FSM gives us a LayerFinish + */ } void @@ -393,6 +398,10 @@ LcpDown() NewPhase(PHASE_DEAD); StopAllTimers(); FsmDown(&LcpFsm); + /* + * We now wait for the FsmDown() to result in a LcpLayerDown() (if we're + * open). + */ } void