]> git.ipfire.org Git - thirdparty/xtables-addons.git/commitdiff
build: remove support for Linux 2.6.19
authorJan Engelhardt <jengelh@inai.de>
Mon, 15 Oct 2012 21:21:18 +0000 (23:21 +0200)
committerJan Engelhardt <jengelh@inai.de>
Tue, 16 Oct 2012 00:36:06 +0000 (02:36 +0200)
doc/changelog.txt
extensions/compat_skbuff.h
extensions/compat_xtables.c
extensions/compat_xtables.h
extensions/compat_xtnu.h

index 4aceb507741489651b17d67aea7eb887e9be7fea..c81ad7a8faa9647951988945ab5874d4992342ef 100644 (file)
@@ -2,7 +2,7 @@
 HEAD
 ====
 Changes:
-- remove support for Linux 2.6.17--2.6.18
+- remove support for Linux 2.6.17--2.6.19
 
 
 v1.47.1 (2010-10-15)
index df210f502caf13a9f3dfb31adf077ff04fa6ed4a..c5700c9580702538fdac148ee5b77d2c4b994716 100644 (file)
@@ -21,11 +21,7 @@ static inline struct rtable *skb_rtable(const struct sk_buff *skb)
 }
 #endif
 
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 19)
-#      define skb_ifindex(skb) \
-               (((skb)->input_dev != NULL) ? (skb)->input_dev->ifindex : 0)
-#      define skb_nfmark(skb) (((struct sk_buff *)(skb))->nfmark)
-#elif LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 32)
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 32)
 #      define skb_ifindex(skb) (skb)->iif
 #      define skb_nfmark(skb) (((struct sk_buff *)(skb))->mark)
 #else
index 6b8c64928ea567088a5d31750598f27e7d466551..d60f8ee91aaf9ca6d2c76b26ff3f863203bdc3ea 100644 (file)
@@ -533,39 +533,6 @@ void xtnu_proto_csum_replace4(__sum16 *sum, struct sk_buff *skb,
 EXPORT_SYMBOL_GPL(xtnu_proto_csum_replace4);
 #endif
 
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 19)
-int xtnu_neigh_hh_output(struct hh_cache *hh, struct sk_buff *skb)
-{
-       unsigned int hh_alen;
-
-       read_lock_bh(&hh->hh_lock);
-       hh_alen = HH_DATA_ALIGN(hh->hh_len);
-       memcpy(skb->data - hh_alen, hh->hh_data, hh_alen);
-       read_unlock_bh(&hh->hh_lock);
-       skb_push(skb, hh->hh_len);
-       return hh->hh_output(skb);
-}
-EXPORT_SYMBOL_GPL(xtnu_neigh_hh_output);
-
-static inline __wsum xtnu_csum_unfold(__sum16 n)
-{
-       return (__force __wsum)n;
-}
-
-void xtnu_csum_replace4(__sum16 *sum, __be32 from, __be32 to)
-{
-       __be32 diff[] = {~from, to};
-       *sum = csum_fold(csum_partial((char *)diff, sizeof(diff),
-              ~xtnu_csum_unfold(*sum)));
-}
-
-void xtnu_csum_replace2(__sum16 *sum, __be16 from, __be16 to)
-{
-       xtnu_csum_replace4(sum, (__force __be32)from, (__force __be32)to);
-}
-EXPORT_SYMBOL_GPL(xtnu_csum_replace2);
-#endif
-
 void *HX_memmem(const void *space, size_t spacesize,
     const void *point, size_t pointsize)
 {
index d98203b88f5b7b0d91e0afdbd6b99d7b284a41af..f423e72b4047997ab0d14fd77962e24a7c4b9996 100644 (file)
@@ -8,8 +8,8 @@
 
 #define DEBUGP Use__pr_debug__instead
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)
-#      warning Kernels below 2.6.19 not supported.
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
+#      warning Kernels below 2.6.20 not supported.
 #endif
 
 #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE)
 #      warning You need either CONFIG_NF_CONNTRACK or CONFIG_IP_NF_CONNTRACK.
 #endif
 
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 19)
-#      define neigh_hh_output xtnu_neigh_hh_output
-#      define IPPROTO_UDPLITE 136
-#      define CSUM_MANGLED_0 ((__force __sum16)0xffff)
-#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 xt_unregister_matches xtnu_unregister_matches
 #endif
 
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 19)
-#      define csum_replace2 xtnu_csum_replace2
-#      define csum_replace4 xtnu_csum_replace4
-#      define inet_proto_csum_replace4 xtnu_proto_csum_replace4
-#elif LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 24)
+#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
index 71e59468ae2151337766be526b81bfdb879a1354..6aa8e9eb914d5c38a8df860155a471191bc146fd 100644 (file)
@@ -5,13 +5,7 @@
 #include <linux/netfilter/x_tables.h>
 #include <linux/spinlock.h>
 
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 19)
-typedef __u16 __bitwise __sum16;
-typedef __u32 __bitwise __wsum;
-#endif
-
 struct flowi;
-struct hh_cache;
 struct module;
 struct net_device;
 struct rtable;
@@ -131,13 +125,6 @@ static inline struct xtnu_target *xtcompat_nutarget(const struct xt_target *t)
        return q;
 }
 
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 19)
-static inline __wsum csum_unfold(__sum16 n)
-{
-       return (__force __wsum)n;
-}
-#endif
-
 extern int xtnu_ip_local_out(struct sk_buff *);
 extern int xtnu_ip_route_me_harder(struct sk_buff **, unsigned int);
 extern int xtnu_skb_make_writable(struct sk_buff **, unsigned int);
@@ -152,9 +139,6 @@ extern int xtnu_register_targets(struct xtnu_target *, unsigned int);
 extern void xtnu_unregister_targets(struct xtnu_target *, unsigned int);
 extern struct xt_match *xtnu_request_find_match(unsigned int,
        const char *, uint8_t);
-extern int xtnu_neigh_hh_output(struct hh_cache *, struct sk_buff *);
-extern void xtnu_csum_replace2(__u16 __bitwise *, __be16, __be16);
-extern void xtnu_csum_replace4(__u16 __bitwise *, __be32, __be32);
 extern void xtnu_proto_csum_replace4(__u16 __bitwise *, struct sk_buff *,
        __be32, __be32, bool);
 extern int xtnu_ipv6_skip_exthdr(const struct sk_buff *, int,