From 6a0ae483145159b0c903690c0313dbc03745c412 Mon Sep 17 00:00:00 2001 From: "/C=EU/ST=EU/CN=Jozsef Kadlecsik/emailAddress=kadlec@blackhole.kfki.hu" Date: Sat, 19 Jul 2008 20:48:19 +0000 Subject: Compatibility cleanup release: kernels >= 2.6.16 and 2.4.36.x are supported. --- kernel/ip_set_portmap.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'kernel/ip_set_portmap.c') diff --git a/kernel/ip_set_portmap.c b/kernel/ip_set_portmap.c index 3e158be..aeaabcd 100644 --- a/kernel/ip_set_portmap.c +++ b/kernel/ip_set_portmap.c @@ -28,11 +28,7 @@ static inline ip_set_ip_t get_port(const struct sk_buff *skb, u_int32_t flags) { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) struct iphdr *iph = ip_hdr(skb); -#else - struct iphdr *iph = skb->nh.iph; -#endif u_int16_t offset = ntohs(iph->frag_off) & IP_OFFSET; switch (iph->protocol) { case IPPROTO_TCP: { @@ -42,11 +38,7 @@ get_port(const struct sk_buff *skb, u_int32_t flags) if (offset) return INVALID_PORT; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) if (skb_copy_bits(skb, ip_hdr(skb)->ihl*4, &tcph, sizeof(tcph)) < 0) -#else - if (skb_copy_bits(skb, skb->nh.iph->ihl*4, &tcph, sizeof(tcph)) < 0) -#endif /* No choice either */ return INVALID_PORT; @@ -59,11 +51,7 @@ get_port(const struct sk_buff *skb, u_int32_t flags) if (offset) return INVALID_PORT; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) if (skb_copy_bits(skb, ip_hdr(skb)->ihl*4, &udph, sizeof(udph)) < 0) -#else - if (skb_copy_bits(skb, skb->nh.iph->ihl*4, &udph, sizeof(udph)) < 0) -#endif /* No choice either */ return INVALID_PORT; -- cgit v1.2.3