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_nethash.c | |
parent | 87c406c4962ea52f467b9807daf66e3652bd0e9b (diff) |
Compatibility cleanup release: kernels >= 2.6.16 and 2.4.36.x are supported.
Diffstat (limited to 'kernel/ip_set_nethash.c')
-rw-r--r-- | kernel/ip_set_nethash.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/kernel/ip_set_nethash.c b/kernel/ip_set_nethash.c index bb866b5..ecdf369 100644 --- a/kernel/ip_set_nethash.c +++ b/kernel/ip_set_nethash.c @@ -8,6 +8,7 @@ /* Kernel module implementing a cidr nethash set */ #include <linux/module.h> +#include <linux/moduleparam.h> #include <linux/ip.h> #include <linux/skbuff.h> #include <linux/version.h> @@ -111,13 +112,8 @@ testip_kernel(struct ip_set *set, { return __testip(set, ntohl(flags[index] & IPSET_SRC -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) ? ip_hdr(skb)->saddr : ip_hdr(skb)->daddr), -#else - ? skb->nh.iph->saddr - : skb->nh.iph->daddr), -#endif hash_ip); } @@ -206,13 +202,8 @@ addip_kernel(struct ip_set *set, struct ip_set_nethash *map = set->data; int ret = -ERANGE; ip_set_ip_t ip = ntohl(flags[index] & IPSET_SRC -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) ? ip_hdr(skb)->saddr : ip_hdr(skb)->daddr); -#else - ? skb->nh.iph->saddr - : skb->nh.iph->daddr); -#endif if (map->cidr[0]) ret = __addip(map, ip, map->cidr[0], hash_ip); @@ -338,13 +329,8 @@ delip_kernel(struct ip_set *set, struct ip_set_nethash *map = set->data; int ret = -ERANGE; ip_set_ip_t ip = ntohl(flags[index] & IPSET_SRC -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22) ? ip_hdr(skb)->saddr : ip_hdr(skb)->daddr); -#else - ? skb->nh.iph->saddr - : skb->nh.iph->daddr); -#endif if (map->cidr[0]) ret = __delip(map, ip, map->cidr[0], hash_ip); |