summaryrefslogtreecommitdiffstats
path: root/iptables/xshared.h
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2020-11-17 00:57:10 +0100
committerPhil Sutter <phil@nwl.cc>2021-05-17 15:07:22 +0200
commit556f704458cdb509d395ddb7d2629987d60e762e (patch)
tree115282e7391fb411e8d0f92b5324b32142efed22 /iptables/xshared.h
parenteea68ca828b6a757490d91fc87dcac2f15647f40 (diff)
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 <phil@nwl.cc>
Diffstat (limited to 'iptables/xshared.h')
-rw-r--r--iptables/xshared.h2
1 files changed, 1 insertions, 1 deletions
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 *);