Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Commit

Permalink
ppp: remove hardcoded lcp-echo-failure, lcp-echo-interval values
Browse files Browse the repository at this point in the history
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: openwrt/luci#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 <[email protected]>
(backported from bd68b71)
  • Loading branch information
jow- committed Dec 18, 2018
1 parent 0500887 commit d91d2dd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions package/network/services/ppp/files/etc/ppp/options
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,3 @@ nopcomp
nocrtscts
lock
maxfail 0
lcp-echo-failure 5
lcp-echo-interval 1
2 changes: 2 additions & 0 deletions package/network/services/ppp/files/ppp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit d91d2dd

Please sign in to comment.