diff options
| author | Jo-Philipp Wich | 2022-10-05 11:23:57 +0000 |
|---|---|---|
| committer | Jo-Philipp Wich | 2022-10-05 11:23:57 +0000 |
| commit | 592ba4577e9beaf66e4bbac31c20c1cc3299be9a (patch) | |
| tree | 7c9fadcfb9170312469a38104fd054bdcd3fd30b | |
| parent | b0a6bff4ee4410cd554811fa0ca3b28fce908473 (diff) | |
| download | firewall4-592ba4577e9beaf66e4bbac31c20c1cc3299be9a.tar.gz | |
main.uc: remove uneeded/wrong set reload restrictions
Always reload sets, regardless of whether they contain entries or not.
Also don't require a set to define a `loadfile` option in order to get
reloaded by `fw4 reload-sets`.
Ref: https://forum.openwrt.org/t/x/138579/53
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
| -rw-r--r-- | root/usr/share/firewall4/main.uc | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/root/usr/share/firewall4/main.uc b/root/usr/share/firewall4/main.uc index 077191d..1d8a405 100644 --- a/root/usr/share/firewall4/main.uc +++ b/root/usr/share/firewall4/main.uc @@ -18,9 +18,6 @@ function reload_sets() { sets = fw4.check_set_types(); for (let set in state.ipsets) { - if (!set.loadfile || !length(set.entries)) - continue; - if (!exists(sets, set.name)) { warn(`Named set '${set.name}' does not exist - do you need to restart the firewall?\n`); continue; |