[PATCH firewall3] ipsets: allow commented lines with loadfile

Henrique de Moraes Holschuh henrique at nic.br
Sun Oct 25 15:17:21 EDT 2020


On 25/10/2020 05:11, Daniel Harding wrote:
> When loading ipset files using the loadfile option, skip lines that
> start with '#'.

I suggest skipping any leading whitespace before checking for '#', 
preferably through cype.h isblank() if the codebase already uses ctype.h.

If you don't allow initial whitespace on comment lines, it can get 
confusing for users: the vast majority of formats that support comments 
starting with # up to EOL do allow whitespace before the #.

-- 
Henrique de Moraes Holschuh
www.nic.br



More information about the openwrt-devel mailing list