summaryrefslogtreecommitdiff
path: root/accel-pppd/ppp/ppp_fsm.c
diff options
context:
space:
mode:
authorKozlov Dmitry <dima@server>2011-04-28 12:12:10 +0400
committerKozlov Dmitry <dima@server>2011-04-28 12:12:26 +0400
commite6bd476ac97b342d201d5eb436b9a6c43e7f135e (patch)
tree2433a1fcb5d260425a4869e28b3b3630cfaf8f03 /accel-pppd/ppp/ppp_fsm.c
parent2dbb0397c7371ad55f6c90fe0fbe305058a39a09 (diff)
downloadaccel-ppp-e6bd476ac97b342d201d5eb436b9a6c43e7f135e.tar.gz
accel-ppp-e6bd476ac97b342d201d5eb436b9a6c43e7f135e.zip
various ppp and mppe improvements
Diffstat (limited to 'accel-pppd/ppp/ppp_fsm.c')
-rw-r--r--accel-pppd/ppp/ppp_fsm.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/accel-pppd/ppp/ppp_fsm.c b/accel-pppd/ppp/ppp_fsm.c
index c6bc430..0e27a78 100644
--- a/accel-pppd/ppp/ppp_fsm.c
+++ b/accel-pppd/ppp/ppp_fsm.c
@@ -14,7 +14,7 @@
static int conf_max_terminate = 2;
static int conf_max_configure = 10;
static int conf_max_failure = 10;
-static int conf_timeout = 5;
+static int conf_timeout = 1;
void send_term_req(struct ppp_fsm_t *layer);
void send_term_ack(struct ppp_fsm_t *layer);
@@ -35,7 +35,8 @@ void ppp_fsm_init(struct ppp_fsm_t *layer)
layer->max_terminate = conf_max_terminate;
layer->max_configure = conf_max_configure;
layer->max_failure = conf_max_failure;
- layer->timeout = conf_timeout;
+
+ layer->id = 1;
}
void ppp_fsm_free(struct ppp_fsm_t *layer)
{
@@ -168,7 +169,6 @@ void ppp_fsm_timeout0(struct ppp_fsm_t *layer)
case FSM_Req_Sent:
case FSM_Ack_Sent:
--layer->restart_counter;
- --layer->id;
if (layer->send_conf_req) layer->send_conf_req(layer);
break;
default:
@@ -315,6 +315,7 @@ void ppp_fsm_recv_conf_req_rej(struct ppp_fsm_t *layer)
void ppp_fsm_recv_conf_ack(struct ppp_fsm_t *layer)
{
+ ++layer->id;
switch(layer->fsm_state)
{
case FSM_Closed:
@@ -351,6 +352,7 @@ void ppp_fsm_recv_conf_ack(struct ppp_fsm_t *layer)
void ppp_fsm_recv_conf_rej(struct ppp_fsm_t *layer)
{
+ ++layer->id;
switch(layer->fsm_state)
{
case FSM_Closed: