summaryrefslogtreecommitdiff
path: root/accel-pppd/ctrl/pptp/pptp.c
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2011-01-25 20:38:21 +0300
committerDmitry Kozlov <xeb@mail.ru>2011-01-26 00:52:49 +0300
commita7eaf069a979a923f0411584ed2154fff5e86036 (patch)
tree4738449feb63436b38639c54278d9c8d3219daf0 /accel-pppd/ctrl/pptp/pptp.c
parent64b0cc8703122437fb46e890ea0c0b4fda1d77da (diff)
downloadaccel-ppp-a7eaf069a979a923f0411584ed2154fff5e86036.tar.gz
accel-ppp-a7eaf069a979a923f0411584ed2154fff5e86036.zip
ppp, radius: Acct-Terminate-Cause=Lost-Carrier when ppp terminates by lcp reply absence
Diffstat (limited to 'accel-pppd/ctrl/pptp/pptp.c')
-rw-r--r--accel-pppd/ctrl/pptp/pptp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/accel-pppd/ctrl/pptp/pptp.c b/accel-pppd/ctrl/pptp/pptp.c
index 687aecb..17087fa 100644
--- a/accel-pppd/ctrl/pptp/pptp.c
+++ b/accel-pppd/ctrl/pptp/pptp.c
@@ -83,7 +83,7 @@ static void disconnect(struct pptp_conn_t *conn)
if (conn->state == STATE_PPP) {
__sync_sub_and_fetch(&stat_active, 1);
conn->state = STATE_CLOSE;
- ppp_terminate(&conn->ppp, TERM_USER_REQUEST, 1);
+ ppp_terminate(&conn->ppp, TERM_LOST_CARRIER, 1);
} else if (conn->state != STATE_CLOSE)
__sync_sub_and_fetch(&stat_starting, 1);
@@ -366,6 +366,9 @@ static int pptp_call_clear_rqst(struct pptp_conn_t *conn)
if (conf_verbose)
log_ppp_info2("recv [PPTP Call-Clear-Request <Call-ID %x>]\n", ntohs(rqst->call_id));
+ if (conn->echo_timer.tpd)
+ triton_timer_del(&conn->echo_timer);
+
if (conn->state == STATE_PPP) {
__sync_sub_and_fetch(&stat_active, 1);
conn->state = STATE_CLOSE;