summaryrefslogtreecommitdiffstats
path: root/iptables/xtables-arp.c
diff options
context:
space:
mode:
authorPhil Sutter <phil@nwl.cc>2018-08-02 17:05:23 +0200
committerFlorian Westphal <fw@strlen.de>2018-08-04 23:19:25 +0200
commitd11b6b8c3cc459eeec6438e2ad35e8ab46b3527f (patch)
treea0c0848878f361c4d291e5f1f5077ba22bdf0422 /iptables/xtables-arp.c
parent3f279553a2908bfa3ad76211ee657c97e4103563 (diff)
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 <phil@nwl.cc> Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'iptables/xtables-arp.c')
-rw-r--r--iptables/xtables-arp.c11
1 files changed, 0 insertions, 11 deletions
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) {