diff options
author | Kozlov Dmitry <dima@server> | 2011-06-02 12:41:11 +0400 |
---|---|---|
committer | Kozlov Dmitry <dima@server> | 2011-06-02 12:41:11 +0400 |
commit | 779348ad22a6ec3d10ee7ffe47eef2887b183ef6 (patch) | |
tree | 271a1f7fce537f77e75ee125188985ec2a052892 /accel-pppd | |
parent | 717647882aaeba977acb7b866e9d03db49e5d62f (diff) | |
download | accel-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')
-rw-r--r-- | accel-pppd/accel-ppp.conf | 2 | ||||
-rw-r--r-- | accel-pppd/ppp/ppp_ccp.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/accel-pppd/accel-ppp.conf b/accel-pppd/accel-ppp.conf index c1bace8c..c566a504 100644 --- a/accel-pppd/accel-ppp.conf +++ b/accel-pppd/accel-ppp.conf @@ -37,7 +37,7 @@ echo-interval=30 echo-failure=3 [pptp] -echo-interval=30 +#echo-interval=30 verbose=1 [pppoe] 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) |