From 844b69d854d80925fa97e5f9c971ec5d27d19f32 Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Mon, 5 Dec 2022 17:33:48 +1100 Subject: [PATCH] pppd: Fix spurious LCP echo failures with lcp-echo-adaptive option If the lcp-echo-adaptive option is specified, it means that seeing received traffic on the link is considered to be an indication that the link is working. Hence, this resets the count of missing LCP echo-replies to 0 when traffic is seen. Without this, occasional echo failures interspersed with link traffic can accumulate and end up causing a disconnection even when the link is working correctly. Signed-off-by: Paul Mackerras --- pppd/lcp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pppd/lcp.c b/pppd/lcp.c index 9dc883e..6354f39 100644 --- a/pppd/lcp.c +++ b/pppd/lcp.c @@ -2279,6 +2279,8 @@ LcpSendEchoRequest (fsm *f) if (get_ppp_stats(f->unit, &cur_stats) && cur_stats.pkts_in != last_pkts_in) { last_pkts_in = cur_stats.pkts_in; + /* receipt of traffic indicates the link is working... */ + lcp_echos_pending = 0; return; } } -- 2.39.2