From ea3e4b2ed5e86370a4f5032d6ad53bf28354cb83 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 16 Oct 2012 00:52:56 +0200 Subject: [PATCH] build: remove support for Linux 2.6.33 --- INSTALL | 2 +- configure.ac | 2 +- doc/changelog.txt | 2 +- extensions/compat_xtables.c | 12 ++++-------- extensions/compat_xtables.h | 13 ++++--------- extensions/xt_DNETMAP.c | 19 ------------------- 6 files changed, 11 insertions(+), 39 deletions(-) diff --git a/INSTALL b/INSTALL index 5d1cc28..37a5018 100644 --- a/INSTALL +++ b/INSTALL @@ -14,7 +14,7 @@ Supported configurations for this release * iptables >= 1.4.5 - * kernel-devel >= 2.6.33 + * kernel-devel >= 2.6.34 with prepared build/output directory - CONFIG_NF_CONNTRACK or CONFIG_IP_NF_CONNTRACK - CONFIG_NF_CONNTRACK_MARK or CONFIG_IP_NF_CONNTRACK_MARK diff --git a/configure.ac b/configure.ac index 49b06f4..864e5ad 100644 --- a/configure.ac +++ b/configure.ac @@ -67,7 +67,7 @@ if test -n "$kbuilddir"; then echo "WARNING: That kernel version is not officially supported."; elif test "$kmajor" -eq 3; then :; - elif test "$kmajor" -eq 2 -a "$kminor" -eq 6 -a "$kmicro" -ge 33; then + elif test "$kmajor" -eq 2 -a "$kminor" -eq 6 -a "$kmicro" -ge 34; then :; else echo "WARNING: That kernel version is not officially supported."; diff --git a/doc/changelog.txt b/doc/changelog.txt index 9c090eb..38fc8a6 100644 --- a/doc/changelog.txt +++ b/doc/changelog.txt @@ -2,7 +2,7 @@ HEAD ==== Changes: -- remove support for Linux 2.6.17--2.6.32 +- remove support for Linux 2.6.17--2.6.33 v1.47.1 (2010-10-15) diff --git a/extensions/compat_xtables.c b/extensions/compat_xtables.c index 4f3d14f..f8a422c 100644 --- a/extensions/compat_xtables.c +++ b/extensions/compat_xtables.c @@ -30,8 +30,7 @@ # define WITH_IPV6 1 #endif -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33) && \ - LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 34) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 34) static bool xtnu_match_run(const struct sk_buff *skb, const struct xt_match_param *par) { @@ -56,8 +55,7 @@ static bool xtnu_match_run(const struct sk_buff *skb, } #endif -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33) && \ - LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 34) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 34) static bool xtnu_match_check(const struct xt_mtchk_param *par) { struct xtnu_match *nm = xtcompat_numatch(par->match); @@ -146,8 +144,7 @@ void xtnu_unregister_matches(struct xtnu_match *nt, unsigned int num) EXPORT_SYMBOL_GPL(xtnu_unregister_matches); #endif -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33) && \ - LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 34) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 34) static unsigned int xtnu_target_run(struct sk_buff *skb, const struct xt_target_param *par) { @@ -174,8 +171,7 @@ xtnu_target_run(struct sk_buff *skb, const struct xt_action_param *par) } #endif -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33) && \ - LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 34) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 34) static bool xtnu_target_check(const struct xt_tgchk_param *par) { struct xtnu_target *nt = xtcompat_nutarget(par->target); diff --git a/extensions/compat_xtables.h b/extensions/compat_xtables.h index 91bf5c9..c3f3432 100644 --- a/extensions/compat_xtables.h +++ b/extensions/compat_xtables.h @@ -8,8 +8,8 @@ #define DEBUGP Use__pr_debug__instead -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33) -# warning Kernels below 2.6.33 not supported. +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34) +# warning Kernels below 2.6.34 not supported. #endif #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) @@ -29,13 +29,8 @@ # define xt_unregister_matches xtnu_unregister_matches #endif -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) -# define ipt_unregister_table(tbl) ipt_unregister_table(&init_net, (tbl)) -# define ip6t_unregister_table(tbl) ip6t_unregister_table(&init_net, (tbl)) -#else -# define ipt_unregister_table(tbl) ipt_unregister_table(tbl) -# define ip6t_unregister_table(tbl) ip6t_unregister_table(tbl) -#endif +#define ipt_unregister_table(tbl) ipt_unregister_table(&init_net, (tbl)) +#define ip6t_unregister_table(tbl) ip6t_unregister_table(&init_net, (tbl)) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36) # define rt_dst(rt) (&(rt)->dst) diff --git a/extensions/xt_DNETMAP.c b/extensions/xt_DNETMAP.c index be2817a..fe2b269 100644 --- a/extensions/xt_DNETMAP.c +++ b/extensions/xt_DNETMAP.c @@ -28,10 +28,8 @@ #include #include #include -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) #include #include -#endif #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0) # include #else @@ -109,16 +107,11 @@ struct dnetmap_net { struct list_head *dnetmap_iphash; }; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) static int dnetmap_net_id; static inline struct dnetmap_net *dnetmap_pernet(struct net *net) { return net_generic(net, dnetmap_net_id); } -#else -struct dnetmap_net *dnetmap; -#define dnetmap_pernet(x) dnetmap -#endif static DEFINE_SPINLOCK(dnetmap_lock); static DEFINE_MUTEX(dnetmap_mutex); @@ -871,13 +864,6 @@ static int __net_init dnetmap_net_init(struct net *net) struct dnetmap_net *dnetmap_net = dnetmap_pernet(net); int i; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34) - dnetmap = kmalloc(sizeof(struct dnetmap_net),GFP_ATOMIC); - if (dnetmap == NULL) - return -ENOMEM; - dnetmap_net = dnetmap; -#endif - dnetmap_net->dnetmap_iphash = kmalloc(sizeof(struct list_head) * hash_size * 2, GFP_ATOMIC); if (dnetmap_net->dnetmap_iphash == NULL) @@ -906,20 +892,15 @@ static void __net_exit dnetmap_net_exit(struct net *net) mutex_unlock(&dnetmap_mutex); kfree(dnetmap_net->dnetmap_iphash); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34) kfree(dnetmap_net); -#endif - dnetmap_proc_net_exit(net); } static struct pernet_operations dnetmap_net_ops = { .init = dnetmap_net_init, .exit = dnetmap_net_exit, -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34) .id = &dnetmap_net_id, .size = sizeof(struct dnetmap_net), -#endif }; static struct xt_target dnetmap_tg_reg __read_mostly = {