From 8d7b74ed52922b352a39993ed6856fccf826f25b Mon Sep 17 00:00:00 2001 From: Vladislav Grishenko Date: Sat, 28 Jan 2017 02:53:17 +0500 Subject: pptp: implement adaptive pptp echo With incoming pptp echo request there's no need to ask peer for replies in configured echo-interval, so just postpone it. Helps against false-positive echo failures with heavily loaded channels and/or peers. --- accel-pppd/ctrl/pptp/pptp.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'accel-pppd/ctrl/pptp') diff --git a/accel-pppd/ctrl/pptp/pptp.c b/accel-pppd/ctrl/pptp/pptp.c index 03f6e98..fa48687 100644 --- a/accel-pppd/ctrl/pptp/pptp.c +++ b/accel-pppd/ctrl/pptp/pptp.c @@ -413,6 +413,9 @@ static int pptp_echo_rqst(struct pptp_conn_t *conn) log_ppp_debug("send [PPTP Echo-Reply ]\n", out_msg.identifier); } + if (conn->echo_timer.tpd) + triton_timer_mod(&conn->echo_timer, 0); + return post_msg(conn, &out_msg, sizeof(out_msg)); } -- cgit v1.2.3