From 613080fbc9d1e77c5fc4fe5b9a28e4f51e415a0f Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sat, 22 Jan 2022 00:28:50 +0100 Subject: 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 --- modules/luci-base/root/usr/libexec/rpcd/luci | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'modules/luci-base/root/usr/libexec') 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 -- cgit v1.2.3