diff options
author | /C=EU/ST=EU/CN=Jozsef Kadlecsik/emailAddress=kadlec@blackhole.kfki.hu </C=EU/ST=EU/CN=Jozsef Kadlecsik/emailAddress=kadlec@blackhole.kfki.hu> | 2008-07-19 20:48:19 +0000 |
---|---|---|
committer | /C=EU/ST=EU/CN=Jozsef Kadlecsik/emailAddress=kadlec@blackhole.kfki.hu </C=EU/ST=EU/CN=Jozsef Kadlecsik/emailAddress=kadlec@blackhole.kfki.hu> | 2008-07-19 20:48:19 +0000 |
commit | 6a0ae483145159b0c903690c0313dbc03745c412 (patch) | |
tree | c76f14af1d80295c94eeba826bdec75cda73ad55 /kernel/ip_set_portmap.c | |
parent | 87c406c4962ea52f467b9807daf66e3652bd0e9b (diff) |
Compatibility cleanup release: kernels >= 2.6.16 and 2.4.36.x are supported.
Diffstat (limited to 'kernel/ip_set_portmap.c')
-rw-r--r-- | kernel/ip_set_portmap.c | 12 |
1 files changed, 0 insertions, 12 deletions
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; |