summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Cernekee <cernekee@gmail.com>2013-11-01 21:08:34 -0700
committerPablo Neira Ayuso <pablo@netfilter.org>2013-11-03 22:42:43 +0100
commit517495f85d84cd783a23ef56eced3670f6473a60 (patch)
treee1a1cd67af735d2843018561a71287ad7d98ee82
parent9b3fd1352c9806ef5acc10f38b1131bc2f62b60c (diff)
ip6tables: Use consistent exit code for EAGAIN
As of commit 056564f6a (Add new exit value to indicate concurrency issues), the IPv4 iptables binary returns exit status 4 to indicate that the kernel returned EAGAIN when trying to update a table. But ip6tables still returns exit status 1 under the same circumstances. Update ip6tables to bring it in line with iptables behavior. Signed-off-by: Kevin Cernekee <cernekee@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--iptables/ip6tables-standalone.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/iptables/ip6tables-standalone.c b/iptables/ip6tables-standalone.c
index 656e08d5..35d2d9a5 100644
--- a/iptables/ip6tables-standalone.c
+++ b/iptables/ip6tables-standalone.c
@@ -73,6 +73,8 @@ ip6tables_main(int argc, char *argv[])
fprintf(stderr, "ip6tables: %s.\n",
ip6tc_strerror(errno));
}
+ if (errno == EAGAIN)
+ exit(RESOURCE_PROBLEM);
}
exit(!ret);