]> git.ipfire.org Git - thirdparty/xtables-addons.git/commitdiff
build: remove support for Linux 2.6.24
authorJan Engelhardt <jengelh@inai.de>
Mon, 15 Oct 2012 22:21:04 +0000 (00:21 +0200)
committerJan Engelhardt <jengelh@inai.de>
Tue, 16 Oct 2012 02:16:57 +0000 (04:16 +0200)
doc/changelog.txt
extensions/compat_xtables.c
extensions/compat_xtables.h
extensions/ip6table_rawpost.c
extensions/iptable_rawpost.c

index 1c52c4581732bb72687b34c6b6f238308fb925ae..547bdddd7bfff6864dfab3abfe8277ffc32c0af7 100644 (file)
@@ -2,7 +2,7 @@
 HEAD
 ====
 Changes:
-- remove support for Linux 2.6.17--2.6.23
+- remove support for Linux 2.6.17--2.6.24
 
 
 v1.47.1 (2010-10-15)
index c1f4d83bca2ec92f0a73eb3f2c2f869fa164792f..0177d6207b9e23359fb9abd8f83e52c5c262a823 100644 (file)
@@ -425,57 +425,6 @@ int xtnu_skb_make_writable(struct sk_buff **pskb, unsigned int len)
 }
 EXPORT_SYMBOL_GPL(xtnu_skb_make_writable);
 
-#if LINUX_VERSION_CODE == KERNEL_VERSION(2, 6, 24)
-static int __xtnu_ip_local_out(struct sk_buff *skb)
-{
-       struct iphdr *iph = ip_hdr(skb);
-
-       iph->tot_len = htons(skb->len);
-       ip_send_check(iph);
-       return nf_hook(PF_INET, NF_IP_LOCAL_OUT, skb, NULL,
-                      skb->dst->dev, dst_output);
-}
-
-int xtnu_ip_local_out(struct sk_buff *skb)
-{
-       int err;
-
-       err = __xtnu_ip_local_out(skb);
-       if (likely(err == 1))
-               err = dst_output(skb);
-
-       return err;
-}
-EXPORT_SYMBOL_GPL(xtnu_ip_local_out);
-#endif
-
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 24)
-int xtnu_ip_route_output_key(void *net, struct rtable **rp, struct flowi *flp)
-{
-       return ip_route_output_flow(rp, flp, NULL, 0);
-}
-EXPORT_SYMBOL_GPL(xtnu_ip_route_output_key);
-
-void xtnu_proto_csum_replace4(__sum16 *sum, struct sk_buff *skb,
-    __be32 from, __be32 to, bool pseudohdr)
-{
-       __be32 diff[] = {~from, to};
-       const void *dv = diff; /* kludge for < v2.6.19-555-g72685fc */
-
-       if (skb->ip_summed != CHECKSUM_PARTIAL) {
-               *sum = csum_fold(csum_partial(dv, sizeof(diff),
-                      ~csum_unfold(*sum)));
-               if (skb->ip_summed == CHECKSUM_COMPLETE && pseudohdr)
-                       skb->csum = ~csum_partial(dv, sizeof(diff),
-                                   ~skb->csum);
-       } else if (pseudohdr) {
-               *sum = ~csum_fold(csum_partial(dv, sizeof(diff),
-                      csum_unfold(*sum)));
-       }
-}
-EXPORT_SYMBOL_GPL(xtnu_proto_csum_replace4);
-#endif
-
 void *HX_memmem(const void *space, size_t spacesize,
     const void *point, size_t pointsize)
 {
index 142b0b0d61dc87fda9fd593c17eb4d7f1aeada64..676a6c894fec988e5100ca9682b550a8564b4414 100644 (file)
@@ -8,8 +8,8 @@
 
 #define DEBUGP Use__pr_debug__instead
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)
-#      warning Kernels below 2.6.24 not supported.
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25)
+#      warning Kernels below 2.6.25 not supported.
 #endif
 
 #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
 #      warning You need CONFIG_NF_CONNTRACK.
 #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
-#      define NF_INET_LOCAL_OUT    NF_IP_LOCAL_OUT
-#      define NF_INET_POST_ROUTING NF_IP_POST_ROUTING
-#      define ip_local_out         xtnu_ip_local_out
-#      define ip_route_output_key  xtnu_ip_route_output_key
-#      include "compat_nfinetaddr.h"
-#endif
-
 #if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 34)
 #      define xt_match              xtnu_match
 #      define xt_register_match     xtnu_register_match
 #      define xt_unregister_matches xtnu_unregister_matches
 #endif
 
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 24)
-#      define csum_replace2 nf_csum_replace2
-#      define csum_replace4 nf_csum_replace4
-#      define inet_proto_csum_replace4 xtnu_proto_csum_replace4
-#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))
index abc16bb6fdb5dc66dc987c58d0f297037801d520..2159876174271a0da8ad0d920503c87b855e2d21 100644 (file)
@@ -68,17 +68,10 @@ static int __init rawpost6_table_init(void)
 #if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 29)
        rwlock_init(&rawpost6_itable.lock);
 #endif
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
        rawpost6_ptable = ip6t_register_table(&init_net, &rawpost6_itable,
                          &rawpost6_initial.repl);
        if (IS_ERR(rawpost6_ptable))
                return PTR_ERR(rawpost6_ptable);
-#else
-       ret = ip6t_register_table(&rawpost6_itable, &rawpost6_initial.repl);
-       if (ret < 0)
-               return ret;
-       rawpost6_ptable = &rawpost6_itable;
-#endif
 
        ret = nf_register_hook(&rawpost6_hook_ops);
        if (ret < 0)
index 50a45c4c8c2f8f7bef1de70dc1b713556a05a850..9abea278618164ebd812fd782345fe71c1b04569 100644 (file)
@@ -69,17 +69,10 @@ static int __init rawpost4_table_init(void)
 #if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 29)
        rwlock_init(&rawpost4_itable.lock);
 #endif
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)
        rawpost4_ptable = ipt_register_table(&init_net, &rawpost4_itable,
                          &rawpost4_initial.repl);
        if (IS_ERR(rawpost4_ptable))
                return PTR_ERR(rawpost4_ptable);
-#else
-       ret = ipt_register_table(&rawpost4_itable, &rawpost4_initial.repl);
-       if (ret < 0)
-               return ret;
-       rawpost4_ptable = &rawpost4_itable;
-#endif
 
        ret = nf_register_hook(&rawpost4_hook_ops);
        if (ret < 0)