summaryrefslogtreecommitdiff
path: root/accel-pppd/ppp
diff options
context:
space:
mode:
authorKozlov Dmitry <dima@server>2011-06-02 12:41:11 +0400
committerKozlov Dmitry <dima@server>2011-06-02 12:41:11 +0400
commit779348ad22a6ec3d10ee7ffe47eef2887b183ef6 (patch)
tree271a1f7fce537f77e75ee125188985ec2a052892 /accel-pppd/ppp
parent717647882aaeba977acb7b866e9d03db49e5d62f (diff)
downloadaccel-ppp-779348ad22a6ec3d10ee7ffe47eef2887b183ef6.tar.gz
accel-ppp-779348ad22a6ec3d10ee7ffe47eef2887b183ef6.zip
ppp: terminate CCP if negotiation is not completed in max-failure tries
Diffstat (limited to 'accel-pppd/ppp')
-rw-r--r--accel-pppd/ppp/ppp_ccp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/accel-pppd/ppp/ppp_ccp.c b/accel-pppd/ppp/ppp_ccp.c
index 7c191915..9b7ac3e7 100644
--- a/accel-pppd/ppp/ppp_ccp.c
+++ b/accel-pppd/ppp/ppp_ccp.c
@@ -159,7 +159,6 @@ void ccp_layer_finish(struct ppp_layer_data_t *ld)
ccp_set_flags(ccp->ppp->unit_fd, 0, 0);
ccp->fsm.fsm_state = FSM_Closed;
- ccp->ppp->ccp_started = 1;
log_ppp_debug("ccp_layer_finished\n");
ppp_layer_finished(ccp->ppp, &ccp->ld);
@@ -201,10 +200,11 @@ static void ccp_layer_down(struct ppp_fsm_t *fsm)
log_ppp_debug("ccp_layer_finished\n");
ccp->ppp->ccp_started = 1;
- if (!ccp->started)
+ if (!ccp->started) {
+ ccp->started = 1;
+ ppp_fsm_close(fsm);
ppp_layer_started(ccp->ppp, &ccp->ld);
- ccp->started = 0;
- ppp_layer_finished(ccp->ppp, &ccp->ld);
+ }
}
static void print_ropt(struct recv_opt_t *ropt)