build: remove support for Linux 2.6.17

This commit is contained in:
Jan Engelhardt
2012-10-15 20:37:54 +02:00
parent 8db01220fd
commit 0dcc56bc62
5 changed files with 5 additions and 28 deletions

View File

@@ -1,6 +1,8 @@
HEAD HEAD
==== ====
Changes:
- remove support for Linux 2.6.17
v1.47.1 (2010-10-15) v1.47.1 (2010-10-15)

View File

@@ -463,10 +463,7 @@ EXPORT_SYMBOL_GPL(xtnu_request_find_match);
int xtnu_ip_route_me_harder(struct sk_buff **pskb, unsigned int addr_type) int xtnu_ip_route_me_harder(struct sk_buff **pskb, unsigned int addr_type)
{ {
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 17) #if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 23)
/* Actually this one is valid up to 2.6.18.4, but changed in 2.6.18.5 */
return ip_route_me_harder(pskb);
#elif LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 23)
return ip_route_me_harder(pskb, addr_type); return ip_route_me_harder(pskb, addr_type);
#else #else
return ip_route_me_harder(*pskb, addr_type); return ip_route_me_harder(*pskb, addr_type);
@@ -595,14 +592,6 @@ void xtnu_csum_replace2(__sum16 *sum, __be16 from, __be16 to)
EXPORT_SYMBOL_GPL(xtnu_csum_replace2); EXPORT_SYMBOL_GPL(xtnu_csum_replace2);
#endif #endif
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 17)
int xtnu_skb_linearize(struct sk_buff *skb)
{
return skb_linearize(skb, GFP_ATOMIC);
}
EXPORT_SYMBOL_GPL(xtnu_skb_linearize);
#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, 17) #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18)
# warning Kernels below 2.6.17 not supported. # warning Kernels below 2.6.18 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,11 +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, 17)
# define skb_init_secmark(skb)
# define skb_linearize xtnu_skb_linearize
#endif
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 19) #if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 19)
# define neigh_hh_output xtnu_neigh_hh_output # define neigh_hh_output xtnu_neigh_hh_output
# define IPPROTO_UDPLITE 136 # define IPPROTO_UDPLITE 136

View File

@@ -161,7 +161,6 @@ extern void xtnu_csum_replace2(__u16 __bitwise *, __be16, __be16);
extern void xtnu_csum_replace4(__u16 __bitwise *, __be32, __be32); 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_skb_linearize(struct sk_buff *);
extern int xtnu_ipv6_skip_exthdr(const struct sk_buff *, int, extern int xtnu_ipv6_skip_exthdr(const struct sk_buff *, int,
uint8_t *, __be16 *); uint8_t *, __be16 *);
extern int xtnu_ipv6_find_hdr(const struct sk_buff *, unsigned int *, extern int xtnu_ipv6_find_hdr(const struct sk_buff *, unsigned int *,

View File

@@ -208,13 +208,9 @@ static void tarpit_tcp4(struct sk_buff *oldskb, unsigned int hook,
nf_reset(nskb); nf_reset(nskb);
skb_nfmark(nskb) = 0; skb_nfmark(nskb) = 0;
skb_init_secmark(nskb); skb_init_secmark(nskb);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 18)
skb_shinfo(nskb)->gso_size = 0; skb_shinfo(nskb)->gso_size = 0;
skb_shinfo(nskb)->gso_segs = 0; skb_shinfo(nskb)->gso_segs = 0;
skb_shinfo(nskb)->gso_type = 0; skb_shinfo(nskb)->gso_type = 0;
#endif
oldhdr = ip_hdr(oldskb); oldhdr = ip_hdr(oldskb);
tcph = (struct tcphdr *)(skb_network_header(nskb) + ip_hdrlen(nskb)); tcph = (struct tcphdr *)(skb_network_header(nskb) + ip_hdrlen(nskb));
@@ -359,13 +355,9 @@ static void tarpit_tcp6(struct sk_buff *oldskb, unsigned int hook,
nf_reset(nskb); nf_reset(nskb);
skb_nfmark(nskb) = 0; skb_nfmark(nskb) = 0;
skb_init_secmark(nskb); skb_init_secmark(nskb);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 18)
skb_shinfo(nskb)->gso_size = 0; skb_shinfo(nskb)->gso_size = 0;
skb_shinfo(nskb)->gso_segs = 0; skb_shinfo(nskb)->gso_segs = 0;
skb_shinfo(nskb)->gso_type = 0; skb_shinfo(nskb)->gso_type = 0;
#endif
skb_put(nskb, sizeof(struct ipv6hdr)); skb_put(nskb, sizeof(struct ipv6hdr));
ip6h = ipv6_hdr(nskb); ip6h = ipv6_hdr(nskb);
*(__be32 *)ip6h = htonl(0x60000000 | (tclass << 20)); *(__be32 *)ip6h = htonl(0x60000000 | (tclass << 20));