[netfilter-cvslog] r7080 - trunk/iptables

kaber at trash.net kaber at trash.net
Thu Oct 18 16:27:03 CEST 2007


Author: kaber at trash.net
Date: 2007-10-18 16:27:03 +0200 (Thu, 18 Oct 2007)
New Revision: 7080

Modified:
   trunk/iptables/ip6tables-save.c
   trunk/iptables/iptables-save.c
Log:
[PATCH]: Don't silenty exit on failure to open /proc/net/{ip,ip6}_tables_names

Victor Stinner <victor.stinner at inl.fr>


Modified: trunk/iptables/ip6tables-save.c
===================================================================
--- trunk/iptables/ip6tables-save.c	2007-10-18 12:34:20 UTC (rev 7079)
+++ trunk/iptables/ip6tables-save.c	2007-10-18 14:27:03 UTC (rev 7080)
@@ -231,7 +231,9 @@
 
 	procfile = fopen("/proc/net/ip6_tables_names", "r");
 	if (!procfile)
-		return 0;
+		exit_error(OTHER_PROBLEM,
+			   "Unable to open /proc/net/ip6_tables_names: %s\n",
+			   strerror(errno));
 
 	while (fgets(tablename, sizeof(tablename), procfile)) {
 		if (tablename[strlen(tablename) - 1] != '\n')

Modified: trunk/iptables/iptables-save.c
===================================================================
--- trunk/iptables/iptables-save.c	2007-10-18 12:34:20 UTC (rev 7079)
+++ trunk/iptables/iptables-save.c	2007-10-18 14:27:03 UTC (rev 7080)
@@ -242,7 +242,9 @@
 
 	procfile = fopen("/proc/net/ip_tables_names", "r");
 	if (!procfile)
-		return 0;
+		exit_error(OTHER_PROBLEM,
+			   "Unable to open /proc/net/ip_tables_names: %s\n",
+			   strerror(errno));
 
 	while (fgets(tablename, sizeof(tablename), procfile)) {
 		if (tablename[strlen(tablename) - 1] != '\n')




More information about the netfilter-cvslog mailing list