diff --git a/INSTALL b/INSTALL index 818d8ba..1c0af0e 100644 --- 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 diff --git a/extensions/compat_xtables.c b/extensions/compat_xtables.c index b1d8808..35dad77 100644 --- a/extensions/compat_xtables.c +++ b/extensions/compat_xtables.c @@ -9,8 +9,7 @@ #include #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) diff --git a/extensions/compat_xtables.h b/extensions/compat_xtables.h index ab9ca01..666408b 100644 --- a/extensions/compat_xtables.h +++ b/extensions/compat_xtables.h @@ -3,7 +3,11 @@ #include -#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