[netfilter-cvslog] r6454 - trunk/iptables/extensions

laforge at netfilter.org laforge at netfilter.org
Wed Feb 1 13:58:28 CET 2006


Author: laforge at netfilter.org
Date: 2006-02-01 13:58:28 +0100 (Wed, 01 Feb 2006)
New Revision: 6454

Modified:
   trunk/iptables/extensions/libipt_sctp.c
Log:
Some !%$!*##$@ has modified the kernel include/linux/netfilter_ipv4/ipt_sctp.h
file in a way that breaks userspace :(


Modified: trunk/iptables/extensions/libipt_sctp.c
===================================================================
--- trunk/iptables/extensions/libipt_sctp.c	2006-02-01 12:57:34 UTC (rev 6453)
+++ trunk/iptables/extensions/libipt_sctp.c	2006-02-01 12:58:28 UTC (rev 6454)
@@ -16,8 +16,21 @@
 
 #include <iptables.h>
 #include <linux/netfilter_ipv4/ip_tables.h>
+
+#ifndef ARRAY_SIZE
+#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
+#endif
+
 #include <linux/netfilter_ipv4/ipt_sctp.h>
 
+/* Some ZS!#@:$%*#$! has replaced the ELEMCOUNT macro in ipt_sctp.h with
+ * ARRAY_SIZE without noticing that this file is used from userserspace,
+ * and userspace doesn't have ARRAY_SIZE */
+
+#ifndef ELEMCOUNT
+#define ELEMCOUNT ARRAY_SIZE
+#endif
+
 #if 0
 #define DEBUGP(format, first...) printf(format, ##first)
 #define static




More information about the netfilter-cvslog mailing list