From: Jo-Philipp Wich Date: Fri, 21 Jan 2022 23:28:50 +0000 (+0100) Subject: luci-base: fix ubus luci.getConntrackHelpers call with firewall4 X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=613080fbc9d1e77c5fc4fe5b9a28e4f51e415a0f;p=openwrt-luci.git 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 --- 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