Skip to content

Commit eef9d90

Browse files
Alexey Dobriyandavem330
authored andcommitted
netns: correct mib stats in ip6_route_me_harder()
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 4ef079c commit eef9d90

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎net/ipv6/netfilter.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
int ip6_route_me_harder(struct sk_buff *skb)
1414
{
15+
struct net *net = dev_net(skb->dst->dev);
1516
struct ipv6hdr *iph = ipv6_hdr(skb);
1617
struct dst_entry *dst;
1718
struct flowi fl = {
@@ -23,7 +24,7 @@ int ip6_route_me_harder(struct sk_buff *skb)
2324
.saddr = iph->saddr, } },
2425
};
2526

26-
dst = ip6_route_output(dev_net(skb->dst->dev), skb->sk, &fl);
27+
dst = ip6_route_output(net, skb->sk, &fl);
2728

2829
#ifdef CONFIG_XFRM
2930
if (!(IP6CB(skb)->flags & IP6SKB_XFRM_TRANSFORMED) &&
@@ -33,8 +34,7 @@ int ip6_route_me_harder(struct sk_buff *skb)
3334
#endif
3435

3536
if (dst->error) {
36-
IP6_INC_STATS(&init_net, ip6_dst_idev(dst),
37-
IPSTATS_MIB_OUTNOROUTES);
37+
IP6_INC_STATS(net, ip6_dst_idev(dst), IPSTATS_MIB_OUTNOROUTES);
3838
LIMIT_NETDEBUG(KERN_DEBUG "ip6_route_me_harder: No more route.\n");
3939
dst_release(dst);
4040
return -EINVAL;

0 commit comments

Comments
 (0)