From 779348ad22a6ec3d10ee7ffe47eef2887b183ef6 Mon Sep 17 00:00:00 2001 From: Kozlov Dmitry Date: Thu, 2 Jun 2011 12:41:11 +0400 Subject: ppp: terminate CCP if negotiation is not completed in max-failure tries --- accel-pppd/accel-ppp.conf | 2 +- accel-pppd/ppp/ppp_ccp.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'accel-pppd') 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) -- cgit v1.2.3