summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@ozlabs.org>2022-12-05 17:33:48 +1100
committerPaul Mackerras <paulus@ozlabs.org>2022-12-05 17:33:48 +1100
commit844b69d854d80925fa97e5f9c971ec5d27d19f32 (patch)
tree7b55bf3b3fe6322e1900d80af0e78564c2560ffe
parent184aaa447eea970cc7cb680263b104636e6e7a31 (diff)
downloadppp-844b69d854d80925fa97e5f9c971ec5d27d19f32.tar.gz
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 <paulus@ozlabs.org>
-rw-r--r--pppd/lcp.c2
1 files changed, 2 insertions, 0 deletions
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;
}
}