[netfilter-cvslog] r3343 - in trunk/nfsim/kernelenv: . include

rusty at netfilter.org rusty at netfilter.org
Mon Dec 13 07:31:59 CET 2004


Author: rusty at netfilter.org
Date: 2004-12-13 07:31:58 +0100 (Mon, 13 Dec 2004)
New Revision: 3343

Modified:
   trunk/nfsim/kernelenv/include/kernelenv.h
   trunk/nfsim/kernelenv/kernelenv.c
Log:
Testing compatibility with more kernels.


Modified: trunk/nfsim/kernelenv/include/kernelenv.h
===================================================================
--- trunk/nfsim/kernelenv/include/kernelenv.h	2004-12-13 06:02:20 UTC (rev 3342)
+++ trunk/nfsim/kernelenv/include/kernelenv.h	2004-12-13 06:31:58 UTC (rev 3343)
@@ -498,7 +498,6 @@
 void (*ip_ct_attach)(struct sk_buff *, struct sk_buff *);
 #endif /* 2.6.9 */
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,8)
 static inline void nf_reset(struct sk_buff *skb)
 {
 	nf_conntrack_put(skb->nfct);
@@ -513,7 +512,6 @@
 	skb->nf_debug = 0;
 #endif
 }
-#endif /* >= 2.6.8 */
 
 extern void nf_ct_attach(struct sk_buff *, struct sk_buff *);
 
@@ -574,7 +572,9 @@
 #define skb_copy(skb, gfp) \
 	skb_copy_expand(skb, skb_headroom(skb), skb_tailroom(skb), gfp)
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,7)
+extern int skb_checksum_help(struct sk_buff *skb);
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
 extern int skb_checksum_help(struct sk_buff **pskb, int inward);
 #else
 extern int skb_checksum_help(struct sk_buff *skb, int inward);
@@ -917,7 +917,6 @@
 #define write_lock_bh(x)  __generic_write_lock((x), __FILE__, __LINE__)
 #define write_unlock_bh(x)  __generic_write_unlock((x), __FILE__, __LINE__)
 
-
 #define rcu_read_lock()
 #define rcu_read_unlock()
 
@@ -937,6 +936,8 @@
 /* brlock.h */
 #define br_write_lock_bh(lock)
 #define br_write_unlock_bh(lock)
+#define br_write_lock(lock)
+#define br_write_unlock(lock)
 #define br_read_lock_bh(lock)
 #define br_read_unlock_bh(lock)
 #endif
@@ -1174,6 +1175,10 @@
 #define module_param(name, type, perm)
 #define module_param_array(name, type, num, perm)
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,28)
+#define EXPORT_NO_SYMBOLS
+#endif
+
 #define EXPORT_SYMBOL(x)
 #define EXPORT_SYMBOL_GPL(x)
 

Modified: trunk/nfsim/kernelenv/kernelenv.c
===================================================================
--- trunk/nfsim/kernelenv/kernelenv.c	2004-12-13 06:02:20 UTC (rev 3342)
+++ trunk/nfsim/kernelenv/kernelenv.c	2004-12-13 06:31:58 UTC (rev 3343)
@@ -251,7 +251,12 @@
 	return ret;
 }
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,7)
+int skb_checksum_help(struct sk_buff *skb)
+{
+	return __skb_checksum_help(skb, 0);
+}
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
 int skb_checksum_help(struct sk_buff **pskb, int inward)
 {
 	return __skb_checksum_help(*pskb, inward);




More information about the netfilter-cvslog mailing list