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>
This commit is contained in:
Jo-Philipp Wich 2022-01-22 00:28:50 +01:00
parent 433db83c65
commit 613080fbc9

View file

@ -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