mirror of
https://github.com/openwrt/luci.git
synced 2026-04-15 10:51:51 +00:00
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>
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user