path: root/iptables/nft-arp.c
diff options
authorPhil Sutter <>2019-01-31 16:12:50 +0100
committerFlorian Westphal <>2019-01-31 22:53:00 +0100
commit043bf38bc9ee020bbf1a9789773050d47f83b807 (patch)
tree53d12f0c1daaa08096c93ba05c94614fedde5ca8 /iptables/nft-arp.c
parenta5f517a41d72794fae3d1332e6e0e413a5cd16c1 (diff)
arptables-nft: Fix listing rules without target
Don't try to print cs.jumpto if it is an empty string, otherwise listing (and verbose output) contains '-j' flag without argument. Signed-off-by: Phil Sutter <> Signed-off-by: Florian Westphal <>
Diffstat (limited to 'iptables/nft-arp.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/iptables/nft-arp.c b/iptables/nft-arp.c
index 399f83af..5567daa7 100644
--- a/iptables/nft-arp.c
+++ b/iptables/nft-arp.c
@@ -598,7 +598,7 @@ nft_arp_print_rule(struct nftnl_rule *r, unsigned int num, unsigned int format)
nft_rule_to_iptables_command_state(r, &cs);
- if (cs.jumpto)
+ if (strlen(cs.jumpto))
printf("-j %s ", cs.jumpto);
nft_arp_print_rule_details(&cs.arp, format);
print_matches_and_target(&cs, format);