[PATCH] firewall3: fix duplicate defaults section detection

Rui Salvaterra rsalvaterra at gmail.com
Sun Oct 18 18:28:58 EDT 2020


The flag was initialised and tested, but actually never set when a duplicate
section was found.

Signed-off-by: Rui Salvaterra <rsalvaterra at gmail.com>
---
 defaults.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/defaults.c b/defaults.c
index 0580bfc..bd48958 100644
--- a/defaults.c
+++ b/defaults.c
@@ -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");
 
-- 
2.28.0




More information about the openwrt-devel mailing list