]> git.ipfire.org Git - thirdparty/xtables-addons.git/commitdiff
Remove compat code for kernels below 2.6.22
authorJan Engelhardt <jengelh@computergmbh.de>
Thu, 21 Feb 2008 12:35:19 +0000 (13:35 +0100)
committerJan Engelhardt <jengelh@computergmbh.de>
Thu, 21 Feb 2008 12:35:19 +0000 (13:35 +0100)
Some code already uses ip_hdr() functions which did not exist in
2.6.21 and I do not feel like adding more compat code.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
INSTALL
extensions/compat_xtables.c
extensions/compat_xtables.h

diff --git a/INSTALL b/INSTALL
index 818d8bad55f8cc3f58bc3be084aaa1ab34dc95bb..1c0af0ee3c396f0230f135c6612c351547f0492b 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -14,7 +14,7 @@ Prerequirements
 
        * xtables(-devel) 1.5.0
 
-       * kernel-source >= 2.6.19 with prepared output directory
+       * kernel-source >= 2.6.22 with prepared output directory
 
 
 Selecting extensions
index b1d8808481eef642346c5316befd5e5f40ca7e4a..35dad77ccf97536bac1303b8ff19901c8821fdf9 100644 (file)
@@ -9,8 +9,7 @@
 #include <net/route.h>
 #include "compat_xtnu.h"
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19) && \
-    LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 22)
+#if LINUX_VERSION_CODE == KERNEL_VERSION(2, 6, 22)
 static int xtnu_match_run(const struct sk_buff *skb,
     const struct net_device *in, const struct net_device *out,
     const struct xt_match *cm, const void *matchinfo, int offset,
@@ -114,9 +113,7 @@ void xtnu_unregister_matches(struct xtnu_match *nt, unsigned int num)
                xtnu_unregister_match(&nt[i]);
 }
 EXPORT_SYMBOL_GPL(xtnu_unregister_matches);
-#endif
 
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 22)
 static int xtnu_target_check(const char *table, const void *entry,
     const struct xt_target *ct, void *targinfo, unsigned int hook_mask)
 {
@@ -144,8 +141,7 @@ static bool xtnu_target_check(const char *table, const void *entry,
 }
 #endif
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 19) && \
-    LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 23)
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 23)
 static unsigned int xtnu_target_run(struct sk_buff **pskb,
     const struct net_device *in, const struct net_device *out,
     unsigned int hooknum, const struct xt_target *ct, const void *targinfo)
index ab9ca0152849cbe3f59894e2966598b13a95cc4b..666408bf7cf2b024038382459173a374f6b50bcf 100644 (file)
@@ -3,7 +3,11 @@
 
 #include <linux/version.h>
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)
+#      warning Kernels below 2.6.22 not supported anymore
+#endif
+
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 24)
 #      define NF_INET_PRE_ROUTING  NF_IP_PRE_ROUTING
 #      define NF_INET_LOCAL_IN     NF_IP_LOCAL_IN
 #      define NF_INET_FORWARD      NF_IP_FORWARD
@@ -14,7 +18,7 @@
 #      include "compat_nfinetaddr.h"
 #endif
 
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 22)
+#if LINUX_VERSION_CODE == KERNEL_VERSION(2, 6, 22)
 #      define xt_match              xtnu_match
 #      define xt_register_match     xtnu_register_match
 #      define xt_unregister_match   xtnu_unregister_match