build: remove support for Linux 2.6.19

This commit is contained in:
Jan Engelhardt
2012-10-15 23:21:18 +02:00
parent 66f213e324
commit e640a15ec9
5 changed files with 5 additions and 68 deletions

View File

@@ -2,7 +2,7 @@
HEAD HEAD
==== ====
Changes: 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) v1.47.1 (2010-10-15)

View File

@@ -21,11 +21,7 @@ static inline struct rtable *skb_rtable(const struct sk_buff *skb)
} }
#endif #endif
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 19) #if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 32)
# 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)
# define skb_ifindex(skb) (skb)->iif # define skb_ifindex(skb) (skb)->iif
# define skb_nfmark(skb) (((struct sk_buff *)(skb))->mark) # define skb_nfmark(skb) (((struct sk_buff *)(skb))->mark)
#else #else

View File

@@ -533,39 +533,6 @@ void xtnu_proto_csum_replace4(__sum16 *sum, struct sk_buff *skb,
EXPORT_SYMBOL_GPL(xtnu_proto_csum_replace4); EXPORT_SYMBOL_GPL(xtnu_proto_csum_replace4);
#endif #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, void *HX_memmem(const void *space, size_t spacesize,
const void *point, size_t pointsize) const void *point, size_t pointsize)
{ {

View File

@@ -8,8 +8,8 @@
#define DEBUGP Use__pr_debug__instead #define DEBUGP Use__pr_debug__instead
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19) #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
# warning Kernels below 2.6.19 not supported. # warning Kernels below 2.6.20 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,12 +29,6 @@
# warning You need either CONFIG_NF_CONNTRACK or CONFIG_IP_NF_CONNTRACK. # warning You need either CONFIG_NF_CONNTRACK or CONFIG_IP_NF_CONNTRACK.
#endif #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) #if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 24)
# define NF_INET_PRE_ROUTING NF_IP_PRE_ROUTING # define NF_INET_PRE_ROUTING NF_IP_PRE_ROUTING
# define NF_INET_LOCAL_IN NF_IP_LOCAL_IN # define NF_INET_LOCAL_IN NF_IP_LOCAL_IN
@@ -63,11 +57,7 @@
# define xt_unregister_matches xtnu_unregister_matches # define xt_unregister_matches xtnu_unregister_matches
#endif #endif
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 19) #if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 24)
# 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)
# define csum_replace2 nf_csum_replace2 # define csum_replace2 nf_csum_replace2
# define csum_replace4 nf_csum_replace4 # define csum_replace4 nf_csum_replace4
# define inet_proto_csum_replace4 xtnu_proto_csum_replace4 # define inet_proto_csum_replace4 xtnu_proto_csum_replace4

View File

@@ -5,13 +5,7 @@
#include <linux/netfilter/x_tables.h> #include <linux/netfilter/x_tables.h>
#include <linux/spinlock.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 flowi;
struct hh_cache;
struct module; struct module;
struct net_device; struct net_device;
struct rtable; struct rtable;
@@ -131,13 +125,6 @@ static inline struct xtnu_target *xtcompat_nutarget(const struct xt_target *t)
return q; 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_local_out(struct sk_buff *);
extern int xtnu_ip_route_me_harder(struct sk_buff **, unsigned int); extern int xtnu_ip_route_me_harder(struct sk_buff **, unsigned int);
extern int xtnu_skb_make_writable(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 void xtnu_unregister_targets(struct xtnu_target *, unsigned int);
extern struct xt_match *xtnu_request_find_match(unsigned int, extern struct xt_match *xtnu_request_find_match(unsigned int,
const char *, uint8_t); 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 *, extern void xtnu_proto_csum_replace4(__u16 __bitwise *, struct sk_buff *,
__be32, __be32, bool); __be32, __be32, bool);
extern int xtnu_ipv6_skip_exthdr(const struct sk_buff *, int, extern int xtnu_ipv6_skip_exthdr(const struct sk_buff *, int,