From d11b6b8c3cc459eeec6438e2ad35e8ab46b3527f Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Thu, 2 Aug 2018 17:05:23 +0200 Subject: arptables: Fix jumps into user-defined chains Trying to jump into a user-defined chain was not possible: | arptables-nft -N foo | arptables-nft -A INPUT -j foo | (null) v1.8.0 (nf_tables): RULE_APPEND failed (No such file or directory): rule in chain INPUT Since nft_arp_add() already does the right thing if cs->target is NULL and cs->jumpto contains a non-empty string, simply drop the block of code trying to deal with the situation. Signed-off-by: Phil Sutter Signed-off-by: Florian Westphal --- iptables/xtables-arp.c | 11 ----------- 1 file changed, 11 deletions(-) (limited to 'iptables') diff --git a/iptables/xtables-arp.c b/iptables/xtables-arp.c index 4e291809..28f449e8 100644 --- a/iptables/xtables-arp.c +++ b/iptables/xtables-arp.c @@ -1387,17 +1387,6 @@ int do_commandarp(struct nft_handle *h, int argc, char *argv[], char **table) opt2char(OPT_VIANAMEIN), chain); } - - if (!cs.target && strlen(cs.jumpto) != 0) { - size_t size; - - cs.target = xtables_find_target(XT_STANDARD_TARGET, - XTF_LOAD_MUST_SUCCEED); - size = sizeof(struct arpt_entry_target) + cs.target->size; - cs.target->t = xtables_calloc(1, size); - cs.target->t->u.target_size = size; - strcpy(cs.target->t->u.user.name, cs.jumpto); - } } switch (command) { -- cgit v1.2.3