When loading ipset files using the loadfile option, skip lines that start with '#'.
Signed-off-by: Daniel Harding <dhard...@living180.net> --- ipsets.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ipsets.c b/ipsets.c index 280845b..720f8c8 100644 --- a/ipsets.c +++ b/ipsets.c @@ -351,7 +351,8 @@ load_file(struct fw3_ipset *ipset) } while (fgets(line, sizeof(line), f)) - fw3_pr("add %s %s", ipset->name, line); + if (line[0] != '#') + fw3_pr("add %s %s", ipset->name, line); fclose(f); } -- 2.28.0 _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel