[netfilter-cvslog] r6628 - in trunk/iptables: . include

kaber at netfilter.org kaber at netfilter.org
Mon Jun 19 18:53:03 CEST 2006


Author: kaber at netfilter.org
Date: 2006-06-19 18:53:03 +0200 (Mon, 19 Jun 2006)
New Revision: 6628

Modified:
   trunk/iptables/include/iptables_common.h
   trunk/iptables/iptables-standalone.c
Log:
[PATCH]: Add new exit value to indicate concurrency issues (Jesper Dangaard Brouer <hawk at comx.dk>)


Modified: trunk/iptables/include/iptables_common.h
===================================================================
--- trunk/iptables/include/iptables_common.h	2006-06-19 16:18:00 UTC (rev 6627)
+++ trunk/iptables/include/iptables_common.h	2006-06-19 16:53:03 UTC (rev 6628)
@@ -5,7 +5,8 @@
 enum exittype {
 	OTHER_PROBLEM = 1,
 	PARAMETER_PROBLEM,
-	VERSION_PROBLEM
+	VERSION_PROBLEM,
+	RESOURCE_PROBLEM
 };
 
 /* this is a special 64bit data type that is 8-byte aligned */

Modified: trunk/iptables/iptables-standalone.c
===================================================================
--- trunk/iptables/iptables-standalone.c	2006-06-19 16:18:00 UTC (rev 6627)
+++ trunk/iptables/iptables-standalone.c	2006-06-19 16:53:03 UTC (rev 6628)
@@ -64,9 +64,13 @@
 	if (ret)
 		ret = iptc_commit(&handle);
 
-	if (!ret)
+	if (!ret) {
 		fprintf(stderr, "iptables: %s\n",
 			iptc_strerror(errno));
+		if (errno == EAGAIN) {
+			exit(RESOURCE_PROBLEM);
+		}
+	}
 
 	exit(!ret);
 }




More information about the netfilter-cvslog mailing list