]> git.ipfire.org Git - thirdparty/iptables.git/commit
xtables: add 'printf' attribute to xlate_add
authorFlorian Westphal <fw@strlen.de>
Mon, 12 Nov 2018 13:40:41 +0000 (14:40 +0100)
committerFlorian Westphal <fw@strlen.de>
Mon, 12 Nov 2018 17:33:03 +0000 (18:33 +0100)
commit61d6c3834de32c0ff5808c93da94b2b30b4791c8
tree9286c86102bc3692e6ac30d561fd407de76c257f
parent5edb249b25da2d27bca886eb1aa03e6ce65cc8ca
xtables: add 'printf' attribute to xlate_add

This allows gcc to check format string vs. passed arguments.
Fix the fallout from this as well, typical warning produced is:

libebt_mark_m.c:112:28: warning: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'long unsigned int' [-Wformat=]
   xt_xlate_add(xl, "and 0x%x %s0 ", info->mask, ...
                           ~^        ~~~~~~~~~~

so add the required casts or fixup format strings as needed.
libxt_conntrack also passed an unneeded argument (port), so remove that.

Signed-off-by: Florian Westphal <fw@strlen.de>
extensions/libebt_mark_m.c
extensions/libxt_MARK.c
extensions/libxt_conntrack.c
extensions/libxt_hashlimit.c
include/xtables.h