aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/netfilter.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2015-09-25 15:07:31 -0500
committerPablo Neira Ayuso <pablo@netfilter.org>2015-09-29 20:21:32 +0200
commit5f5d74d723146c5b97c7318b5851af15b30e3304 (patch)
tree670f2e4cc8eb6cdb8cb72ccc611930af40ce09ba /net/ipv6/netfilter.c
parentipv4: Pass struct net into ip_route_me_harder (diff)
downloadlinux-dev-5f5d74d723146c5b97c7318b5851af15b30e3304.tar.xz
linux-dev-5f5d74d723146c5b97c7318b5851af15b30e3304.zip
ipv6: Pass struct net into ip6_route_me_harder
Don't make ip6_route_me_harder guess which network namespace it is routing in, pass the network namespace in. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/ipv6/netfilter.c')
-rw-r--r--net/ipv6/netfilter.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/net/ipv6/netfilter.c b/net/ipv6/netfilter.c
index 26911b93dc7a..d11c46833d61 100644
--- a/net/ipv6/netfilter.c
+++ b/net/ipv6/netfilter.c
@@ -18,9 +18,8 @@
#include <net/ip6_checksum.h>
#include <net/netfilter/nf_queue.h>
-int ip6_route_me_harder(struct sk_buff *skb)
+int ip6_route_me_harder(struct net *net, struct sk_buff *skb)
{
- struct net *net = dev_net(skb_dst(skb)->dev);
const struct ipv6hdr *iph = ipv6_hdr(skb);
unsigned int hh_len;
struct dst_entry *dst;
@@ -103,7 +102,7 @@ static int nf_ip6_reroute(struct net *net, struct sk_buff *skb,
if (!ipv6_addr_equal(&iph->daddr, &rt_info->daddr) ||
!ipv6_addr_equal(&iph->saddr, &rt_info->saddr) ||
skb->mark != rt_info->mark)
- return ip6_route_me_harder(skb);
+ return ip6_route_me_harder(net, skb);
}
return 0;
}