ipset/kernel-3_3.diff

68 lines
2.3 KiB
Diff
Raw Normal View History

parent 5f5e497db1f0810ce50bc8807836312c75511079 (v6.10-9-g5f5e497)
commit b2d4e4b4e6c48dc0d53eeab3b52ce56f01a29397
Author: Jan Engelhardt <jengelh@medozas.de>
Date: Sat Dec 31 02:22:10 2011 +0100
kernel 3.2 support
---
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(-)
diff --git a/kernel/net/netfilter/ipset/ip_set_getport.c b/kernel/net/netfilter/ipset/ip_set_getport.c
index 58ca4e1..836855f 100644
--- a/kernel/net/netfilter/ipset/ip_set_getport.c
+++ b/kernel/net/netfilter/ipset/ip_set_getport.c
@@ -12,6 +12,7 @@
#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>
@@ -115,9 +116,14 @@ ip_set_get_ip6_port(const struct sk_buff *skb, bool src,
{
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;
diff --git a/kernel/net/netfilter/ipset/ip_set_hash_ip.c b/kernel/net/netfilter/ipset/ip_set_hash_ip.c
index 14a8628..5139dea 100644
--- a/kernel/net/netfilter/ipset/ip_set_hash_ip.c
+++ b/kernel/net/netfilter/ipset/ip_set_hash_ip.c
@@ -241,7 +241,7 @@ hash_ip6_data_isnull(const struct hash_ip6_elem *elem)
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
diff --git a/kernel/net/netfilter/ipset/ip_set_hash_net.c b/kernel/net/netfilter/ipset/ip_set_hash_net.c
index 48e35ba..5a4457a 100644
--- a/kernel/net/netfilter/ipset/ip_set_hash_net.c
+++ b/kernel/net/netfilter/ipset/ip_set_hash_net.c
@@ -267,7 +267,7 @@ static inline void
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;
}
--
# Created with git-export-patch