diff options
author | Jo-Philipp Wich <jo@mein.io> | 2018-08-30 15:08:20 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2018-12-18 11:28:12 +0100 |
commit | 62e7ad1d2100f0b2ea8f5ebd1dc50ac7b841967a (patch) | |
tree | 272ab909068dd19a9eed99e24dfa42c0c0b3b686 | |
parent | 87a6aadfd558a8ea4477c85f55e617e5cc7e77ea (diff) | |
download | openwrt-62e7ad1d2100f0b2ea8f5ebd1dc50ac7b841967a.tar.gz openwrt-62e7ad1d2100f0b2ea8f5ebd1dc50ac7b841967a.tar.bz2 openwrt-62e7ad1d2100f0b2ea8f5ebd1dc50ac7b841967a.zip |
ppp: remove hardcoded lcp-echo-failure, lcp-echo-interval values
OpenWrt used to ship hardcoded defaults for lcp-echo-failure and
lcp-echo-interval in the non-uci /etc/ppp/options file.
These values break uci support for *disabling* LCP echos through
the use of "option keepalive 0" as either omitting the keepalive
option or setting it to 0 will result in no lcp-echo-* flags
getting passed to the pppd cmdline, causing the pppd process to
revert to the defaults in /etc/ppp/options.
Address this issue by letting the uci "keepalive" option default
to the former hardcoded values "5, 1" and by removing the fixed
lcp-echo-failure and lcp-echo-interval settings from the
/etc/ppp/options files.
Ref: https://github.com/openwrt/luci/issues/2112
Ref: https://dev.archive.openwrt.org/ticket/2373.html
Ref: https://bugs.openwrt.org/index.php?do=details&task_id=854
Ref: https://bugs.openwrt.org/index.php?do=details&task_id=1259
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(backported from 555c592304023a0d24216a6d8ed9d525602ae218)
-rw-r--r-- | package/network/services/ppp/files/etc/ppp/options | 2 | ||||
-rwxr-xr-x | package/network/services/ppp/files/ppp.sh | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/package/network/services/ppp/files/etc/ppp/options b/package/network/services/ppp/files/etc/ppp/options index 6b93f7bdb6..dbb2bdb3e2 100644 --- a/package/network/services/ppp/files/etc/ppp/options +++ b/package/network/services/ppp/files/etc/ppp/options @@ -6,5 +6,3 @@ nopcomp nocrtscts lock maxfail 0 -lcp-echo-failure 5 -lcp-echo-interval 1 diff --git a/package/network/services/ppp/files/ppp.sh b/package/network/services/ppp/files/ppp.sh index 73bc3161cd..99d5e4939f 100755 --- a/package/network/services/ppp/files/ppp.sh +++ b/package/network/services/ppp/files/ppp.sh @@ -120,6 +120,8 @@ ppp_generic_setup() { } } + [ -n "$keepalive" ] || keepalive="5 1" + local lcp_failure="${keepalive%%[, ]*}" local lcp_interval="${keepalive##*[, ]}" local lcp_adaptive="lcp-echo-adaptive" |