From 556f704458cdb509d395ddb7d2629987d60e762e Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Tue, 17 Nov 2020 00:57:10 +0100 Subject: Use proto_to_name() from xshared in more places Share the common proto name lookup code. While being at it, make proto number variable 16bit, values may exceed 256. This aligns iptables-nft '-p' argument printing with legacy iptables. In practice, this should make a difference only in corner cases. Signed-off-by: Phil Sutter --- iptables/xshared.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'iptables/xshared.h') diff --git a/iptables/xshared.h b/iptables/xshared.h index dace221b..823894f9 100644 --- a/iptables/xshared.h +++ b/iptables/xshared.h @@ -162,7 +162,7 @@ enum { extern void print_extension_helps(const struct xtables_target *, const struct xtables_rule_match *); -extern const char *proto_to_name(uint8_t, int); +extern const char *proto_to_name(uint16_t, int); extern int command_default(struct iptables_command_state *, struct xtables_globals *, bool invert); extern struct xtables_match *load_proto(struct iptables_command_state *); -- cgit v1.2.3