]> git.ipfire.org Git - thirdparty/iptables.git/commit
xshared: Introduce xt_cmd_parse_ops::option_name
authorPhil Sutter <phil@nwl.cc>
Tue, 14 Nov 2023 17:51:59 +0000 (18:51 +0100)
committerPhil Sutter <phil@nwl.cc>
Wed, 29 Nov 2023 01:33:01 +0000 (02:33 +0100)
commit20e95a4ec5cec14d9e03ba562fa65f015d49dc14
tree1d053079a387a14f2247eff64091c9dadf141a84
parent0f5f2f38baf8de62d2ac81247260d7ee316141aa
xshared: Introduce xt_cmd_parse_ops::option_name

The old opt2char() function was flawed: Since not every field in
optflags contains a printable character, typical use of its return value
in print statements could lead to garbage on screen.

Replace this by a mechanism to retrieve an option's long name which
supports family-specific overrides. and get rid of optflags field
altogether and define NUMBER_OF_OPT similar to NUMBER_OF_CMD.

Signed-off-by: Phil Sutter <phil@nwl.cc>
iptables/ip6tables.c
iptables/iptables.c
iptables/nft-arp.c
iptables/nft-ipv4.c
iptables/nft-ipv6.c
iptables/xshared.c
iptables/xshared.h