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.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'iptables/xshared.c') diff --git a/iptables/xshared.c b/iptables/xshared.c index a3f473ea..49a88de5 100644 --- a/iptables/xshared.c +++ b/iptables/xshared.c @@ -48,7 +48,7 @@ void print_extension_helps(const struct xtables_target *t, } const char * -proto_to_name(uint8_t proto, int nolookup) +proto_to_name(uint16_t proto, int nolookup) { unsigned int i; -- cgit v1.2.3