summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/root/usr/libexec
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2022-01-22 00:28:50 +0100
committerJo-Philipp Wich <jo@mein.io>2022-01-22 00:28:50 +0100
commit613080fbc9d1e77c5fc4fe5b9a28e4f51e415a0f (patch)
treec750782804ad6b1928ac2eb93fa6689bfb44a583 /modules/luci-base/root/usr/libexec
parent433db83c655a0984c584dfad175370588c308e06 (diff)
luci-base: fix ubus luci.getConntrackHelpers call with firewall4
Fallback to firewall4's helper list if the fw3 one cannot be loaded. Fixes broken zone configuration when firewall4 is installed as backend. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-base/root/usr/libexec')
-rwxr-xr-xmodules/luci-base/root/usr/libexec/rpcd/luci6
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/luci-base/root/usr/libexec/rpcd/luci b/modules/luci-base/root/usr/libexec/rpcd/luci
index 1938e3e966..dccdbee900 100755
--- a/modules/luci-base/root/usr/libexec/rpcd/luci
+++ b/modules/luci-base/root/usr/libexec/rpcd/luci
@@ -165,7 +165,11 @@ local methods = {
local ok, fd = pcall(io.open, "/usr/share/fw3/helpers.conf", "r")
local rv = {}
- if ok then
+ if not (ok and fd) then
+ ok, fd = pcall(io.open, "/usr/share/firewall4/helpers", "r")
+ end
+
+ if ok and fd then
local entry
while true do