From 20e95a4ec5cec14d9e03ba562fa65f015d49dc14 Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Tue, 14 Nov 2023 18:51:59 +0100 Subject: 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 --- iptables/nft-ipv6.c | 1 + 1 file changed, 1 insertion(+) (limited to 'iptables/nft-ipv6.c') diff --git a/iptables/nft-ipv6.c b/iptables/nft-ipv6.c index 5aef365b..2cc45944 100644 --- a/iptables/nft-ipv6.c +++ b/iptables/nft-ipv6.c @@ -344,6 +344,7 @@ struct nft_family_ops nft_family_ops_ipv6 = { .cmd_parse = { .proto_parse = ipv6_proto_parse, .post_parse = ipv6_post_parse, + .option_name = ip46t_option_name, }, .rule_to_cs = nft_rule_to_iptables_command_state, .clear_cs = xtables_clear_iptables_command_state, -- cgit v1.2.3