* 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
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.";
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)
# 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)
{
}
#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);
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)
{
}
#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);
#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)
# 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)
#include <linux/netfilter/x_tables.h>
#include <linux/version.h>
#include <net/netfilter/nf_nat_rule.h>
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 34)
#include <net/net_namespace.h>
#include <net/netns/generic.h>
-#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0)
# include <net/netfilter/nf_nat.h>
#else
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);
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)
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 = {