summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/fsm.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2001-01-26 01:43:38 +0000
committerbrian <brian@FreeBSD.org>2001-01-26 01:43:38 +0000
commit2d3be64975dd8e22b3a14c9da1a6654696ca717e (patch)
tree6542924dcfc9dc4ad231567c75175e58cd6b9fb1 /usr.sbin/ppp/fsm.c
parent63b65f9457011d370ef859a506f558b2731883d2 (diff)
downloadFreeBSD-src-2d3be64975dd8e22b3a14c9da1a6654696ca717e.zip
FreeBSD-src-2d3be64975dd8e22b3a14c9da1a6654696ca717e.tar.gz
If executing the stuff from ppp.linkdown results in a state change,
don't continue adjusting the ipcp state machine. This allows ``down'' to work in ppp.linkdown - useful for a tunnel setup.
Diffstat (limited to 'usr.sbin/ppp/fsm.c')
-rw-r--r--usr.sbin/ppp/fsm.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.sbin/ppp/fsm.c b/usr.sbin/ppp/fsm.c
index 80acc33..00f817b 100644
--- a/usr.sbin/ppp/fsm.c
+++ b/usr.sbin/ppp/fsm.c
@@ -349,10 +349,12 @@ fsm_Close(struct fsm *fp)
break;
case ST_OPENED:
(*fp->fn->LayerDown)(fp);
- FsmInitRestartCounter(fp, FSM_TRM_TIMER);
- FsmSendTerminateReq(fp);
- NewState(fp, ST_CLOSING);
- (*fp->parent->LayerDown)(fp->parent->object, fp);
+ if (fp->state == ST_OPENED) {
+ FsmInitRestartCounter(fp, FSM_TRM_TIMER);
+ FsmSendTerminateReq(fp);
+ NewState(fp, ST_CLOSING);
+ (*fp->parent->LayerDown)(fp->parent->object, fp);
+ }
break;
case ST_REQSENT:
case ST_ACKRCVD:
OpenPOWER on IntegriCloud