2012-01-01 04:39:22 +01:00
|
|
|
parent 5f5e497db1f0810ce50bc8807836312c75511079 (v6.10-9-g5f5e497)
|
|
|
|
commit b2d4e4b4e6c48dc0d53eeab3b52ce56f01a29397
|
|
|
|
Author: Jan Engelhardt <jengelh@medozas.de>
|
|
|
|
Date: Sat Dec 31 02:22:10 2011 +0100
|
|
|
|
|
2012-01-20 19:00:13 +01:00
|
|
|
kernel 3.3 support
|
2012-01-01 04:39:22 +01:00
|
|
|
---
|
|
|
|
kernel/net/netfilter/ipset/ip_set_getport.c | 6 ++++++
|
|
|
|
kernel/net/netfilter/ipset/ip_set_hash_ip.c | 2 +-
|
|
|
|
kernel/net/netfilter/ipset/ip_set_hash_net.c | 2 +-
|
|
|
|
3 files changed, 8 insertions(+), 2 deletions(-)
|
|
|
|
|
2012-01-20 19:00:13 +01:00
|
|
|
Index: ipset-6.11/kernel/net/netfilter/ipset/ip_set_getport.c
|
|
|
|
===================================================================
|
|
|
|
--- ipset-6.11.orig/kernel/net/netfilter/ipset/ip_set_getport.c
|
|
|
|
+++ ipset-6.11/kernel/net/netfilter/ipset/ip_set_getport.c
|
|
|
|
@@ -16,6 +16,7 @@
|
2012-01-01 04:39:22 +01:00
|
|
|
#include <linux/icmp.h>
|
|
|
|
#include <linux/icmpv6.h>
|
|
|
|
#include <linux/sctp.h>
|
|
|
|
+#include <linux/version.h>
|
|
|
|
#include <linux/netfilter_ipv6/ip6_tables.h>
|
|
|
|
#include <net/ip.h>
|
|
|
|
#include <net/ipv6.h>
|
2012-01-20 19:00:13 +01:00
|
|
|
@@ -119,9 +120,14 @@ ip_set_get_ip6_port(const struct sk_buff
|
2012-01-01 04:39:22 +01:00
|
|
|
{
|
|
|
|
int protoff;
|
|
|
|
u8 nexthdr;
|
|
|
|
+ __be16 frag_off;
|
|
|
|
|
|
|
|
nexthdr = ipv6_hdr(skb)->nexthdr;
|
|
|
|
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 3, 0)
|
|
|
|
protoff = ipv6_skip_exthdr(skb, sizeof(struct ipv6hdr), &nexthdr);
|
|
|
|
+#else
|
|
|
|
+ protoff = ipv6_skip_exthdr(skb, sizeof(struct ipv6hdr), &nexthdr, &frag_off);
|
|
|
|
+#endif
|
|
|
|
if (protoff < 0)
|
|
|
|
return false;
|
|
|
|
|
2012-01-20 19:00:13 +01:00
|
|
|
Index: ipset-6.11/kernel/net/netfilter/ipset/ip_set_hash_ip.c
|
|
|
|
===================================================================
|
|
|
|
--- ipset-6.11.orig/kernel/net/netfilter/ipset/ip_set_hash_ip.c
|
|
|
|
+++ ipset-6.11/kernel/net/netfilter/ipset/ip_set_hash_ip.c
|
|
|
|
@@ -241,7 +241,7 @@ hash_ip6_data_isnull(const struct hash_i
|
2012-01-01 04:39:22 +01:00
|
|
|
static inline void
|
|
|
|
hash_ip6_data_copy(struct hash_ip6_elem *dst, const struct hash_ip6_elem *src)
|
|
|
|
{
|
|
|
|
- ipv6_addr_copy(&dst->ip.in6, &src->ip.in6);
|
|
|
|
+ dst->ip.in6 = src->ip.in6;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
2012-01-20 19:00:13 +01:00
|
|
|
Index: ipset-6.11/kernel/net/netfilter/ipset/ip_set_hash_net.c
|
|
|
|
===================================================================
|
|
|
|
--- ipset-6.11.orig/kernel/net/netfilter/ipset/ip_set_hash_net.c
|
|
|
|
+++ ipset-6.11/kernel/net/netfilter/ipset/ip_set_hash_net.c
|
|
|
|
@@ -295,7 +295,7 @@ static inline void
|
2012-01-01 04:39:22 +01:00
|
|
|
hash_net6_data_copy(struct hash_net6_elem *dst,
|
|
|
|
const struct hash_net6_elem *src)
|
|
|
|
{
|
|
|
|
- ipv6_addr_copy(&dst->ip.in6, &src->ip.in6);
|
|
|
|
+ dst->ip.in6 = src->ip.in6;
|
|
|
|
dst->cidr = src->cidr;
|
2012-01-20 19:00:13 +01:00
|
|
|
dst->nomatch = src->nomatch;
|
2012-01-01 04:39:22 +01:00
|
|
|
}
|