diff options
author | Jo-Philipp Wich <jo@mein.io> | 2018-08-30 15:28:19 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2018-08-30 15:33:26 +0200 |
commit | 1b2065d0be7f74cb93fac7f208ee4f28666d3f69 (patch) | |
tree | 636137ef2fc954c383feaa0c6956ec80475bca79 /protocols | |
parent | bac444dae6cb697f8f3cfd5e55e5e16e3443e974 (diff) |
luci-proto-ppp: align keepalive defaults with current OpenWrt
Disabling LCP echos by *not* setting "option keepalive" was broken in
OpenWrt since https://dev.archive.openwrt.org/ticket/2373.html so setting
"0" in LuCI had the effect of reverting back to "5, 1" while the help
suggested otherwise.
Support for "keepalive 0" was fixed with https://git.openwrt.org/555c59230
so align LuCI now to emit "option keepalive 0" instead of removing the
option when entering "0" in the gui.
Fixes #2112
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'protocols')
5 files changed, 5 insertions, 5 deletions
diff --git a/protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_ppp.lua b/protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_ppp.lua index 355d9b5b3..5f468bc14 100644 --- a/protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_ppp.lua +++ b/protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_ppp.lua @@ -103,7 +103,7 @@ function keepalive_interval.write(self, section, value) if f > 0 then m:set(section, "keepalive", "%d %d" %{ f, i }) else - m:del(section, "keepalive") + m:set(section, "keepalive", "0") end end diff --git a/protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_pppoa.lua b/protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_pppoa.lua index a5f76a38a..004fd7ef6 100644 --- a/protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_pppoa.lua +++ b/protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_pppoa.lua @@ -109,7 +109,7 @@ function keepalive_interval.write(self, section, value) if f > 0 then m:set(section, "keepalive", "%d %d" %{ f, i }) else - m:del(section, "keepalive") + m:set(section, "keepalive", "0") end end diff --git a/protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_pppoe.lua b/protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_pppoe.lua index 078b5ffe9..f785b7fb6 100644 --- a/protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_pppoe.lua +++ b/protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_pppoe.lua @@ -103,7 +103,7 @@ function keepalive_interval.write(self, section, value) if f > 0 then m:set(section, "keepalive", "%d %d" %{ f, i }) else - m:del(section, "keepalive") + m:set(section, "keepalive", "0") end end diff --git a/protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_pppossh.lua b/protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_pppossh.lua index eca7bdd4d..e53262b5d 100644 --- a/protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_pppossh.lua +++ b/protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_pppossh.lua @@ -105,7 +105,7 @@ function keepalive_interval.write(self, section, value) if f > 0 then m:set(section, "keepalive", "%d %d" %{ f, i }) else - m:del(section, "keepalive") + m:set(section, "keepalive", "0") end end diff --git a/protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_pptp.lua b/protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_pptp.lua index 462d7019f..6a828efe9 100644 --- a/protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_pptp.lua +++ b/protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_pptp.lua @@ -82,7 +82,7 @@ function keepalive_interval.write(self, section, value) if f > 0 then m:set(section, "keepalive", "%d %d" %{ f, i }) else - m:del(section, "keepalive") + m:set(section, "keepalive", "0") end end |