firewall3: fix duplicate defaults section detection
authorRui Salvaterra <rsalvaterra@gmail.com>
Sun, 18 Oct 2020 22:28:58 +0000 (23:28 +0100)
committerJo-Philipp Wich <jo@mein.io>
Sun, 6 Dec 2020 13:47:41 +0000 (14:47 +0100)
The flag was initialised and tested, but actually never set when a duplicate
section was found.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
defaults.c

index 0580bfccccf0e5d4fb9b7704b2f405374cae015d..bd4895861961bcdd1f948988747746916cb5a65d 100644 (file)
@@ -151,6 +151,8 @@ fw3_load_defaults(struct fw3_state *state, struct uci_package *p)
                        continue;
                }
 
+               seen = true;
+
                if(!fw3_parse_options(&state->defaults, fw3_flag_opts, s))
                        warn_elem(e, "has invalid options");