* [PATCH iptables] ip6tables: Use consistent exit code for EAGAIN
@ 2013-11-02 4:08 Kevin Cernekee
2013-11-03 21:43 ` Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: Kevin Cernekee @ 2013-11-02 4:08 UTC (permalink / raw)
To: pablo; +Cc: netfilter-devel
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>
---
iptables/ip6tables-standalone.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/iptables/ip6tables-standalone.c b/iptables/ip6tables-standalone.c
index 656e08d..4e20fe6 100644
--- a/iptables/ip6tables-standalone.c
+++ b/iptables/ip6tables-standalone.c
@@ -73,6 +73,9 @@ ip6tables_main(int argc, char *argv[])
fprintf(stderr, "ip6tables: %s.\n",
ip6tc_strerror(errno));
}
+ if (errno == EAGAIN) {
+ exit(RESOURCE_PROBLEM);
+ }
}
exit(!ret);
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-11-03 21:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-02 4:08 [PATCH iptables] ip6tables: Use consistent exit code for EAGAIN Kevin Cernekee
2013-11-03 21:43 ` Pablo Neira Ayuso
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).