diff options
author | Kozlov Dmitry <dima@server> | 2010-10-08 12:16:07 +0400 |
---|---|---|
committer | Kozlov Dmitry <dima@server> | 2010-10-08 12:16:07 +0400 |
commit | c258ec9bc665fdbd479498a77aea5589b316e074 (patch) | |
tree | 4db52663a053e7237e06d1474e603f97b17aafa2 /accel-pptpd/ppp | |
parent | 66ecf5cd90f437b508749e64914daed0a9e2ba3e (diff) | |
download | accel-ppp-xebd-c258ec9bc665fdbd479498a77aea5589b316e074.tar.gz accel-ppp-xebd-c258ec9bc665fdbd479498a77aea5589b316e074.zip |
ctrl: implemented PPPoE server
Diffstat (limited to 'accel-pptpd/ppp')
-rw-r--r-- | accel-pptpd/ppp/ppp.c | 2 | ||||
-rw-r--r-- | accel-pptpd/ppp/ppp_ccp.c | 2 | ||||
-rw-r--r-- | accel-pptpd/ppp/ppp_fsm.c | 6 | ||||
-rw-r--r-- | accel-pptpd/ppp/ppp_ipcp.c | 2 |
4 files changed, 9 insertions, 3 deletions
diff --git a/accel-pptpd/ppp/ppp.c b/accel-pptpd/ppp/ppp.c index 3e51ecb..24795b1 100644 --- a/accel-pptpd/ppp/ppp.c +++ b/accel-pptpd/ppp/ppp.c @@ -80,7 +80,7 @@ int __export establish_ppp(struct ppp_t *ppp) { /* Open an instance of /dev/ppp and connect the channel to it */ if (ioctl(ppp->fd, PPPIOCGCHAN, &ppp->chan_idx) == -1) { - log_ppp_error("Couldn't get channel number\n"); + log_ppp_error("ioctl(PPPIOCGCHAN): %s\n", strerror(errno)); return -1; } diff --git a/accel-pptpd/ppp/ppp_ccp.c b/accel-pptpd/ppp/ppp_ccp.c index ae9e637..163881b 100644 --- a/accel-pptpd/ppp/ppp_ccp.c +++ b/accel-pptpd/ppp/ppp_ccp.c @@ -153,6 +153,8 @@ 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; + + log_ppp_debug("ccp_layer_finished\n"); ppp_layer_finished(ccp->ppp, &ccp->ld); } diff --git a/accel-pptpd/ppp/ppp_fsm.c b/accel-pptpd/ppp/ppp_fsm.c index 4769dc8..3478d25 100644 --- a/accel-pptpd/ppp/ppp_fsm.c +++ b/accel-pptpd/ppp/ppp_fsm.c @@ -399,7 +399,7 @@ void ppp_fsm_recv_term_req(struct ppp_fsm_t *layer) layer->fsm_state=FSM_Req_Sent; break; default: - layer->send_term_req(layer); + layer->send_term_ack(layer); break; } } @@ -487,8 +487,10 @@ static void init_req_counter(struct ppp_fsm_t *layer,int timeout) } static void zero_req_counter(struct ppp_fsm_t *layer) { - layer->restart_timer.expire_tv.tv_sec=0; layer->restart_counter=0; + + if (!layer->restart_timer.tpd) + triton_timer_add(layer->ppp->ctrl->ctx, &layer->restart_timer, 0); } static void restart_timer_func(struct triton_timer_t *t) diff --git a/accel-pptpd/ppp/ppp_ipcp.c b/accel-pptpd/ppp/ppp_ipcp.c index c46b1bd..90e2b9c 100644 --- a/accel-pptpd/ppp/ppp_ipcp.c +++ b/accel-pptpd/ppp/ppp_ipcp.c @@ -116,6 +116,8 @@ void ipcp_layer_finish(struct ppp_layer_data_t *ld) log_ppp_debug("ipcp_layer_finish\n"); ipcp->fsm.fsm_state = FSM_Closed; + + log_ppp_debug("ipcp_layer_finished\n"); ppp_layer_finished(ipcp->ppp, &ipcp->ld); } |