diff options
Diffstat (limited to 'iptables/nft-shared.c')
-rw-r--r-- | iptables/nft-shared.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/iptables/nft-shared.c b/iptables/nft-shared.c index c1664b50..4253b081 100644 --- a/iptables/nft-shared.c +++ b/iptables/nft-shared.c @@ -826,13 +826,13 @@ void save_rule_details(const struct iptables_command_state *cs, } if (proto > 0) { - const struct protoent *pent = getprotobynumber(proto); + const char *pname = proto_to_name(proto, 0); if (invflags & XT_INV_PROTO) printf("! "); - if (pent) - printf("-p %s ", pent->p_name); + if (pname) + printf("-p %s ", pname); else printf("-p %u ", proto); } |