Skip to contentSkip to conversation

ip6tables: Use consistent exit code for EAGAIN

PATCH Applied Kevin Cernekee 2 participants 2 messages Nov 2, 2013 – Nov 3, 2013 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 iptables/ip6tables-standalone.c |    3 +++
 1 file changed, 3 insertions(+)
iptables/ip6tables-standalone.c +3 -0
index 656e08d..4e20fe6 100644
@@ -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);
Signature · 1 line
1.7.9.5
maintainer Applied
#1 lore raw
Quoted 5 lines · Kevin Cernekee

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.

Applied, thanks.