summaryrefslogtreecommitdiffstats
path: root/iptables/nft.c
diff options
context:
space:
mode:
authorAna Rey <anarey@gmail.com>2014-11-05 16:46:34 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2014-11-09 16:23:03 +0100
commitb92426faab5101bc250832fca85ee8fa3548572d (patch)
tree9047a37beeb4bff27a196d7c3568d069693a6b7a /iptables/nft.c
parentda6c162ce5fb42fa5439ae0b95c321fb476b9cb7 (diff)
iptables-compat: homogenize error messages with 'R' option
There is a difference between error messages in iptables and iptables-compat: # iptables -R INPUT 23 -s 192.168.2.140 -j ACCEPT iptables: Index of replacement too big. # iptables-compat -R INPUT 23 -s 192.168.2.140 -j ACCEPT iptables: No chain/target/match by that name. Now, iptables-compat shows the same error message than iptables in this case. Signed-off-by: Ana Rey <anarey@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'iptables/nft.c')
-rw-r--r--iptables/nft.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/iptables/nft.c b/iptables/nft.c
index 6cb03a0d..64222af8 100644
--- a/iptables/nft.c
+++ b/iptables/nft.c
@@ -2358,7 +2358,7 @@ const char *nft_strerror(int err)
{ nft_chain_user_add, EEXIST, "Chain already exists" },
{ nft_rule_add, E2BIG, "Index of insertion too big" },
{ nft_rule_check, ENOENT, "Bad rule (does a matching rule exist in that chain?)" },
- { nft_rule_replace, E2BIG, "Index of replacement too big" },
+ { nft_rule_replace, ENOENT, "Index of replacement too big" },
{ nft_rule_delete_num, E2BIG, "Index of deletion too big" },
/* { TC_READ_COUNTER, E2BIG, "Index of counter too big" },
{ TC_ZERO_COUNTER, E2BIG, "Index of counter too big" }, */