diff options
author | Kozlov Dmitry <dima@server> | 2010-09-08 15:51:29 +0400 |
---|---|---|
committer | Kozlov Dmitry <dima@server> | 2010-09-08 15:51:29 +0400 |
commit | 4c6469a9fd820db713251a645ac2499782f796ed (patch) | |
tree | fd7c4926eb2a3e2aa047bd14da429f3d6a5f8e6f /accel-pptpd/ppp/ppp_fsm.c | |
parent | ec759f72fcf7d517fdfe8d043c75d0218363bc78 (diff) | |
download | accel-ppp-4c6469a9fd820db713251a645ac2499782f796ed.tar.gz accel-ppp-4c6469a9fd820db713251a645ac2499782f796ed.zip |
radius: implemented packet exchange
radius: implemented PAP authorization
radius: implemented IP assigning
triton: implemented userspace context switching
and other stuff
Diffstat (limited to 'accel-pptpd/ppp/ppp_fsm.c')
-rw-r--r-- | accel-pptpd/ppp/ppp_fsm.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/accel-pptpd/ppp/ppp_fsm.c b/accel-pptpd/ppp/ppp_fsm.c index 85cf15a..a99453f 100644 --- a/accel-pptpd/ppp/ppp_fsm.c +++ b/accel-pptpd/ppp/ppp_fsm.c @@ -38,7 +38,7 @@ void ppp_fsm_free(struct ppp_fsm_t *layer) stop_timer(layer); } -void ppp_fsm_lower_up(struct ppp_fsm_t *layer) +int ppp_fsm_lower_up(struct ppp_fsm_t *layer) { switch(layer->fsm_state) { @@ -49,12 +49,15 @@ void ppp_fsm_lower_up(struct ppp_fsm_t *layer) //if (layer->init_req_cnt) layer->init_req_cnt(layer); init_req_counter(layer,layer->max_configure); --layer->restart_counter; - if (layer->send_conf_req) layer->send_conf_req(layer); + if (layer->send_conf_req) + if (layer->send_conf_req(layer)) + return -1; layer->fsm_state=FSM_Req_Sent; break; default: break; } + return 0; } void ppp_fsm_lower_down(struct ppp_fsm_t *layer) @@ -84,7 +87,7 @@ void ppp_fsm_lower_down(struct ppp_fsm_t *layer) } } -void ppp_fsm_open(struct ppp_fsm_t *layer) +int ppp_fsm_open(struct ppp_fsm_t *layer) { switch(layer->fsm_state) { @@ -98,7 +101,9 @@ void ppp_fsm_open(struct ppp_fsm_t *layer) //if (layer->init_req_cnt) layer->init_req_cnt(layer); init_req_counter(layer,layer->max_configure); --layer->restart_counter; - if (layer->send_conf_req) layer->send_conf_req(layer); + if (layer->send_conf_req) + if (layer->send_conf_req(layer)) + return -1; layer->fsm_state=FSM_Req_Sent; break; case FSM_Closing: @@ -111,6 +116,7 @@ void ppp_fsm_open(struct ppp_fsm_t *layer) default: break; } + return 0; } void ppp_fsm_close(struct ppp_fsm_t *layer) |