From 1b2065d0be7f74cb93fac7f208ee4f28666d3f69 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 30 Aug 2018 15:28:19 +0200 Subject: 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 --- protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_ppp.lua | 2 +- protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_pppoa.lua | 2 +- protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_pppoe.lua | 2 +- .../luci-proto-ppp/luasrc/model/cbi/admin_network/proto_pppossh.lua | 2 +- protocols/luci-proto-ppp/luasrc/model/cbi/admin_network/proto_pptp.lua | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) (limited to 'protocols/luci-proto-ppp/luasrc') 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 355d9b5b39..5f468bc14c 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 a5f76a38ad..004fd7ef67 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 078b5ffe94..f785b7fb6f 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 eca7bdd4d3..e53262b5dc 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 462d7019f0..6a828efe96 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 -- cgit v1.2.3