ipset: move to trunk and add myself as maintainer
[openwrt/staging/lynxis/omap.git] / package / network / utils / ipset / patches / 210-fix-ipv6_skip_exthdr.patch
1 --- a/kernel/net/netfilter/ipset/ip_set_getport.c
2 +++ b/kernel/net/netfilter/ipset/ip_set_getport.c
3 @@ -113,6 +113,17 @@ ip_set_get_ip4_port(const struct sk_buff
4 EXPORT_SYMBOL_GPL(ip_set_get_ip4_port);
5
6 #if defined(CONFIG_IP6_NF_IPTABLES) || defined(CONFIG_IP6_NF_IPTABLES_MODULE)
7 +static int ip_set_skip_exthdr(const struct sk_buff *skb, int start,
8 + u8 *nexthdrp)
9 +{
10 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0)
11 + __be16 fragoff;
12 + return ipv6_skip_exthdr(skb, start, nexthdrp, &fragoff);
13 +#else
14 + return ipv6_skip_exthdr(skb, start, nexthdrp);
15 +#endif
16 +}
17 +
18 bool
19 ip_set_get_ip6_port(const struct sk_buff *skb, bool src,
20 __be16 *port, u8 *proto)
21 @@ -121,7 +132,7 @@ ip_set_get_ip6_port(const struct sk_buff
22 u8 nexthdr;
23
24 nexthdr = ipv6_hdr(skb)->nexthdr;
25 - protoff = ipv6_skip_exthdr(skb, sizeof(struct ipv6hdr), &nexthdr);
26 + protoff = ip_set_skip_exthdr(skb, sizeof(struct ipv6hdr), &nexthdr);
27 if (protoff < 0)
28 return false;
29