[netfilter-cvslog] r6841 - trunk/patch-o-matic-ng/patchlets/set/linux-2.6/net/ipv4/netfilter

kadlec at blackhole.kfki.hu kadlec at blackhole.kfki.hu
Wed May 23 12:11:09 CEST 2007


Author: kadlec at blackhole.kfki.hu
Date: 2007-05-23 12:11:09 +0200 (Wed, 23 May 2007)
New Revision: 6841

Modified:
   trunk/patch-o-matic-ng/patchlets/set/linux-2.6/net/ipv4/netfilter/ip_set_iptree.c
   trunk/patch-o-matic-ng/patchlets/set/linux-2.6/net/ipv4/netfilter/ipt_SET.c
   trunk/patch-o-matic-ng/patchlets/set/linux-2.6/net/ipv4/netfilter/ipt_set.c
Log:
Just compatibility fixes. 


Modified: trunk/patch-o-matic-ng/patchlets/set/linux-2.6/net/ipv4/netfilter/ip_set_iptree.c
===================================================================
--- trunk/patch-o-matic-ng/patchlets/set/linux-2.6/net/ipv4/netfilter/ip_set_iptree.c	2007-05-22 17:28:06 UTC (rev 6840)
+++ trunk/patch-o-matic-ng/patchlets/set/linux-2.6/net/ipv4/netfilter/ip_set_iptree.c	2007-05-23 10:11:09 UTC (rev 6841)
@@ -7,6 +7,7 @@
 
 /* Kernel module implementing an IP set type: the iptree type */
 
+#include <linux/version.h>
 #include <linux/module.h>
 #include <linux/ip.h>
 #include <linux/skbuff.h>
@@ -34,8 +35,13 @@
  * to delete the gc timer at destroying/flushing a set */ 
 #define IPTREE_DESTROY_SLEEP	100
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21)
+static struct kmem_cache *branch_cachep;
+static struct kmem_cache *leaf_cachep;
+#else
 static kmem_cache_t *branch_cachep;
 static kmem_cache_t *leaf_cachep;
+#endif
 
 #define ABCD(a,b,c,d,addrp) do {		\
 	a = ((unsigned char *)addrp)[3];	\

Modified: trunk/patch-o-matic-ng/patchlets/set/linux-2.6/net/ipv4/netfilter/ipt_SET.c
===================================================================
--- trunk/patch-o-matic-ng/patchlets/set/linux-2.6/net/ipv4/netfilter/ipt_SET.c	2007-05-22 17:28:06 UTC (rev 6840)
+++ trunk/patch-o-matic-ng/patchlets/set/linux-2.6/net/ipv4/netfilter/ipt_SET.c	2007-05-23 10:11:09 UTC (rev 6841)
@@ -133,6 +133,9 @@
 
 static struct ipt_target SET_target = {
 	.name 		= "SET",
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21)
+	.family		= AF_INET,
+#endif
 	.target 	= target,
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17)
 	.targetsize	= sizeof(struct ipt_set_info_target),
@@ -146,6 +149,11 @@
 MODULE_AUTHOR("Jozsef Kadlecsik <kadlec at blackhole.kfki.hu>");
 MODULE_DESCRIPTION("iptables IP set target module");
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21)
+#define ipt_register_target      xt_register_target
+#define ipt_unregister_target    xt_unregister_target
+#endif
+
 static int __init ipt_SET_init(void)
 {
 	return ipt_register_target(&SET_target);

Modified: trunk/patch-o-matic-ng/patchlets/set/linux-2.6/net/ipv4/netfilter/ipt_set.c
===================================================================
--- trunk/patch-o-matic-ng/patchlets/set/linux-2.6/net/ipv4/netfilter/ipt_set.c	2007-05-22 17:28:06 UTC (rev 6840)
+++ trunk/patch-o-matic-ng/patchlets/set/linux-2.6/net/ipv4/netfilter/ipt_set.c	2007-05-23 10:11:09 UTC (rev 6841)
@@ -115,6 +115,9 @@
 
 static struct ipt_match set_match = {
 	.name		= "set",
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21)
+	.family		= AF_INET,
+#endif
 	.match		= &match,
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17)
 	.matchsize	= sizeof(struct ipt_set_info_match),
@@ -128,6 +131,11 @@
 MODULE_AUTHOR("Jozsef Kadlecsik <kadlec at blackhole.kfki.hu>");
 MODULE_DESCRIPTION("iptables IP set match module");
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21)
+#define ipt_register_match	xt_register_match
+#define ipt_unregister_match	xt_unregister_match
+#endif
+
 static int __init ipt_ipset_init(void)
 {
 	return ipt_register_match(&set_match);




More information about the netfilter-cvslog mailing list