mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-07 05:05:12 +02:00
build: remove support for Linux 2.6.33
This commit is contained in:
2
INSTALL
2
INSTALL
@@ -14,7 +14,7 @@ Supported configurations for this release
|
|||||||
|
|
||||||
* iptables >= 1.4.5
|
* iptables >= 1.4.5
|
||||||
|
|
||||||
* kernel-devel >= 2.6.33
|
* kernel-devel >= 2.6.34
|
||||||
with prepared build/output directory
|
with prepared build/output directory
|
||||||
- CONFIG_NF_CONNTRACK or CONFIG_IP_NF_CONNTRACK
|
- CONFIG_NF_CONNTRACK or CONFIG_IP_NF_CONNTRACK
|
||||||
- CONFIG_NF_CONNTRACK_MARK or CONFIG_IP_NF_CONNTRACK_MARK
|
- CONFIG_NF_CONNTRACK_MARK or CONFIG_IP_NF_CONNTRACK_MARK
|
||||||
|
@@ -67,7 +67,7 @@ if test -n "$kbuilddir"; then
|
|||||||
echo "WARNING: That kernel version is not officially supported.";
|
echo "WARNING: That kernel version is not officially supported.";
|
||||||
elif test "$kmajor" -eq 3; then
|
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
|
else
|
||||||
echo "WARNING: That kernel version is not officially supported.";
|
echo "WARNING: That kernel version is not officially supported.";
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
HEAD
|
HEAD
|
||||||
====
|
====
|
||||||
Changes:
|
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)
|
v1.47.1 (2010-10-15)
|
||||||
|
@@ -30,8 +30,7 @@
|
|||||||
# define WITH_IPV6 1
|
# define WITH_IPV6 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33) && \
|
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 34)
|
||||||
LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 34)
|
|
||||||
static bool xtnu_match_run(const struct sk_buff *skb,
|
static bool xtnu_match_run(const struct sk_buff *skb,
|
||||||
const struct xt_match_param *par)
|
const struct xt_match_param *par)
|
||||||
{
|
{
|
||||||
@@ -56,8 +55,7 @@ static bool xtnu_match_run(const struct sk_buff *skb,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33) && \
|
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 34)
|
||||||
LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 34)
|
|
||||||
static bool xtnu_match_check(const struct xt_mtchk_param *par)
|
static bool xtnu_match_check(const struct xt_mtchk_param *par)
|
||||||
{
|
{
|
||||||
struct xtnu_match *nm = xtcompat_numatch(par->match);
|
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);
|
EXPORT_SYMBOL_GPL(xtnu_unregister_matches);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33) && \
|
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 34)
|
||||||
LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 34)
|
|
||||||
static unsigned int
|
static unsigned int
|
||||||
xtnu_target_run(struct sk_buff *skb, const struct xt_target_param *par)
|
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
|
#endif
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33) && \
|
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 34)
|
||||||
LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 34)
|
|
||||||
static bool xtnu_target_check(const struct xt_tgchk_param *par)
|
static bool xtnu_target_check(const struct xt_tgchk_param *par)
|
||||||
{
|
{
|
||||||
struct xtnu_target *nt = xtcompat_nutarget(par->target);
|
struct xtnu_target *nt = xtcompat_nutarget(par->target);
|
||||||
|
@@ -8,8 +8,8 @@
|
|||||||
|
|
||||||
#define DEBUGP Use__pr_debug__instead
|
#define DEBUGP Use__pr_debug__instead
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 33)
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
|
||||||
# warning Kernels below 2.6.33 not supported.
|
# warning Kernels below 2.6.34 not supported.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
|
#if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
|
||||||
@@ -29,13 +29,8 @@
|
|||||||
# define xt_unregister_matches xtnu_unregister_matches
|
# define xt_unregister_matches xtnu_unregister_matches
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34)
|
#define ipt_unregister_table(tbl) ipt_unregister_table(&init_net, (tbl))
|
||||||
# define ipt_unregister_table(tbl) ipt_unregister_table(&init_net, (tbl))
|
#define ip6t_unregister_table(tbl) ip6t_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
|
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36)
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36)
|
||||||
# define rt_dst(rt) (&(rt)->dst)
|
# define rt_dst(rt) (&(rt)->dst)
|
||||||
|
@@ -28,10 +28,8 @@
|
|||||||
#include <linux/netfilter/x_tables.h>
|
#include <linux/netfilter/x_tables.h>
|
||||||
#include <linux/version.h>
|
#include <linux/version.h>
|
||||||
#include <net/netfilter/nf_nat_rule.h>
|
#include <net/netfilter/nf_nat_rule.h>
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34)
|
|
||||||
#include <net/net_namespace.h>
|
#include <net/net_namespace.h>
|
||||||
#include <net/netns/generic.h>
|
#include <net/netns/generic.h>
|
||||||
#endif
|
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0)
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0)
|
||||||
# include <net/netfilter/nf_nat.h>
|
# include <net/netfilter/nf_nat.h>
|
||||||
#else
|
#else
|
||||||
@@ -109,16 +107,11 @@ struct dnetmap_net {
|
|||||||
struct list_head *dnetmap_iphash;
|
struct list_head *dnetmap_iphash;
|
||||||
};
|
};
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34)
|
|
||||||
static int dnetmap_net_id;
|
static int dnetmap_net_id;
|
||||||
static inline struct dnetmap_net *dnetmap_pernet(struct net *net)
|
static inline struct dnetmap_net *dnetmap_pernet(struct net *net)
|
||||||
{
|
{
|
||||||
return net_generic(net, dnetmap_net_id);
|
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_SPINLOCK(dnetmap_lock);
|
||||||
static DEFINE_MUTEX(dnetmap_mutex);
|
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);
|
struct dnetmap_net *dnetmap_net = dnetmap_pernet(net);
|
||||||
int i;
|
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) *
|
dnetmap_net->dnetmap_iphash = kmalloc(sizeof(struct list_head) *
|
||||||
hash_size * 2, GFP_ATOMIC);
|
hash_size * 2, GFP_ATOMIC);
|
||||||
if (dnetmap_net->dnetmap_iphash == NULL)
|
if (dnetmap_net->dnetmap_iphash == NULL)
|
||||||
@@ -906,20 +892,15 @@ static void __net_exit dnetmap_net_exit(struct net *net)
|
|||||||
mutex_unlock(&dnetmap_mutex);
|
mutex_unlock(&dnetmap_mutex);
|
||||||
|
|
||||||
kfree(dnetmap_net->dnetmap_iphash);
|
kfree(dnetmap_net->dnetmap_iphash);
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
|
|
||||||
kfree(dnetmap_net);
|
kfree(dnetmap_net);
|
||||||
#endif
|
|
||||||
|
|
||||||
dnetmap_proc_net_exit(net);
|
dnetmap_proc_net_exit(net);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct pernet_operations dnetmap_net_ops = {
|
static struct pernet_operations dnetmap_net_ops = {
|
||||||
.init = dnetmap_net_init,
|
.init = dnetmap_net_init,
|
||||||
.exit = dnetmap_net_exit,
|
.exit = dnetmap_net_exit,
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34)
|
|
||||||
.id = &dnetmap_net_id,
|
.id = &dnetmap_net_id,
|
||||||
.size = sizeof(struct dnetmap_net),
|
.size = sizeof(struct dnetmap_net),
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct xt_target dnetmap_tg_reg __read_mostly = {
|
static struct xt_target dnetmap_tg_reg __read_mostly = {
|
||||||
|
Reference in New Issue
Block a user