diff options
-rw-r--r-- | usr.sbin/ppp/fsm.c | 10 |
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: |