summaryrefslogtreecommitdiffstats
path: root/patches/ppp-2.4.7/0001-adaptive_echos.patch
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2017-06-02 14:56:07 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2017-06-21 09:37:01 +0200
commitcb8f516bb52bd0a197b11e03ae33e4c1343f11d0 (patch)
tree446cc7f910fc578596dcadcabc761001538c831b /patches/ppp-2.4.7/0001-adaptive_echos.patch
parentc98f14fbc7867cdef1246a22cd6a6b8be46bf74e (diff)
downloadptxdist-cb8f516bb52bd0a197b11e03ae33e4c1343f11d0.tar.gz
ptxdist-cb8f516bb52bd0a197b11e03ae33e4c1343f11d0.tar.xz
ppp: version bump to 2.4.7
This updates ppp to version 2.4.7. The former 2.4.5 version had the Debian package patches applied plus some ptxdist specific patches. The Debian patches have been updated to the recent 2.4.7 Debian patches, the ptxdist specific patches have been forward ported from the 2.4.5 ptxdist package. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'patches/ppp-2.4.7/0001-adaptive_echos.patch')
-rw-r--r--patches/ppp-2.4.7/0001-adaptive_echos.patch69
1 files changed, 69 insertions, 0 deletions
diff --git a/patches/ppp-2.4.7/0001-adaptive_echos.patch b/patches/ppp-2.4.7/0001-adaptive_echos.patch
new file mode 100644
index 000000000..c736a350d
--- /dev/null
+++ b/patches/ppp-2.4.7/0001-adaptive_echos.patch
@@ -0,0 +1,69 @@
+From: Marco d'Itri <md@linux.it>
+Date: Thu, 1 Jun 2017 16:18:34 +0200
+Subject: [PATCH] adaptive_echos
+
+---
+ pppd/lcp.c | 19 +++++++++++++++++++
+ pppd/pppd.8 | 5 +++++
+ 2 files changed, 24 insertions(+)
+
+diff --git a/pppd/lcp.c b/pppd/lcp.c
+index 8ed2778bfb67..c97a64b7774f 100644
+--- a/pppd/lcp.c
++++ b/pppd/lcp.c
+@@ -73,6 +73,7 @@ static void lcp_delayed_up __P((void *));
+ */
+ int lcp_echo_interval = 0; /* Interval between LCP echo-requests */
+ int lcp_echo_fails = 0; /* Tolerance to unanswered echo-requests */
++bool lcp_echo_adaptive = 0; /* request echo only if the link was idle */
+ bool lax_recv = 0; /* accept control chars in asyncmap */
+ bool noendpoint = 0; /* don't send/accept endpoint discriminator */
+
+@@ -151,6 +152,8 @@ static option_t lcp_option_list[] = {
+ OPT_PRIO },
+ { "lcp-echo-interval", o_int, &lcp_echo_interval,
+ "Set time in seconds between LCP echo requests", OPT_PRIO },
++ { "lcp-echo-adaptive", o_bool, &lcp_echo_adaptive,
++ "Suppress LCP echo requests if traffic was received", 1 },
+ { "lcp-restart", o_int, &lcp_fsm[0].timeouttime,
+ "Set time in seconds between LCP retransmissions", OPT_PRIO },
+ { "lcp-max-terminate", o_int, &lcp_fsm[0].maxtermtransmits,
+@@ -2332,6 +2335,22 @@ LcpSendEchoRequest (f)
+ }
+
+ /*
++ * If adaptive echos have been enabled, only send the echo request if
++ * no traffic was received since the last one.
++ */
++ if (lcp_echo_adaptive) {
++ static unsigned int last_pkts_in = 0;
++
++ update_link_stats(f->unit);
++ link_stats_valid = 0;
++
++ if (link_stats.pkts_in != last_pkts_in) {
++ last_pkts_in = link_stats.pkts_in;
++ return;
++ }
++ }
++
++ /*
+ * Make and send the echo request frame.
+ */
+ if (f->state == OPENED) {
+diff --git a/pppd/pppd.8 b/pppd/pppd.8
+index e2768b135273..b7fd0bdaab52 100644
+--- a/pppd/pppd.8
++++ b/pppd/pppd.8
+@@ -558,6 +558,11 @@ to 1) if the \fIproxyarp\fR option is used, and will enable the
+ dynamic IP address option (i.e. set /proc/sys/net/ipv4/ip_dynaddr to
+ 1) in demand mode if the local address changes.
+ .TP
++.B lcp\-echo\-adaptive
++If this option is used with the \fIlcp\-echo\-failure\fR option then
++pppd will send LCP echo\-request frames only if no traffic was received
++from the peer since the last echo\-request was sent.
++.TP
+ .B lcp\-echo\-failure \fIn
+ If this option is given, pppd will presume the peer to be dead
+ if \fIn\fR LCP echo\-requests are sent without receiving a valid LCP