diff options
author | Phil Sutter <phil@nwl.cc> | 2018-11-12 14:29:45 +0100 |
---|---|---|
committer | Florian Westphal <fw@strlen.de> | 2018-11-12 14:34:06 +0100 |
commit | 95db36442a85d9d920f737bbe1f28f145ee3f1b8 (patch) | |
tree | 7f4b197f0f3487aa9acefa10219e8f3c3c6ffaa6 | |
parent | 5f508b76a0cebaf91965ffa678089222e2d47964 (diff) |
xtables: Fix typo in do_command() error message
This checks p->chain for existence, not cs->jumpto. Fixes this bogus
error message:
| # iptables-nft -t nat -A FORWARD -j ACCEPT
| iptables v1.8.1 (nf_tables): Chain 'ACCEPT' does not exist
Fixes: b6a06c1a215f8 ("xtables: Align return codes with legacy iptables")
Signed-off-by: Phil Sutter <phil@nwl.cc>
-rw-r--r-- | iptables/xtables.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/iptables/xtables.c b/iptables/xtables.c index 0038804e..429bd652 100644 --- a/iptables/xtables.c +++ b/iptables/xtables.c @@ -1065,7 +1065,7 @@ void do_parse(struct nft_handle *h, int argc, char *argv[], if (!p->xlate && !nft_chain_exists(h, p->table, p->chain)) xtables_error(OTHER_PROBLEM, - "Chain '%s' does not exist", cs->jumpto); + "Chain '%s' does not exist", p->chain); if (!p->xlate && !cs->target && strlen(cs->jumpto) > 0 && !nft_chain_exists(h, p->table, cs->jumpto)) |