From: Paul Mackerras Date: Mon, 5 Dec 2022 06:33:48 +0000 (+1100) Subject: pppd: Fix spurious LCP echo failures with lcp-echo-adaptive option X-Git-Tag: ppp-2.5.0~21 X-Git-Url: https://git.ozlabs.org/?a=commitdiff_plain;h=844b69d854d80925fa97e5f9c971ec5d27d19f32;hp=184aaa447eea970cc7cb680263b104636e6e7a31;p=ppp.git 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 --- 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; } }