Skip to content

Commit

Permalink
netns: correct mib stats in ip6_route_me_harder()
Browse files Browse the repository at this point in the history
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Alexey Dobriyan authored and David S. Miller committed Oct 15, 2008
1 parent 4ef079c commit eef9d90
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions net/ipv6/netfilter.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

int ip6_route_me_harder(struct sk_buff *skb)
{
struct net *net = dev_net(skb->dst->dev);
struct ipv6hdr *iph = ipv6_hdr(skb);
struct dst_entry *dst;
struct flowi fl = {
Expand All @@ -23,7 +24,7 @@ int ip6_route_me_harder(struct sk_buff *skb)
.saddr = iph->saddr, } },
};

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

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

if (dst->error) {
IP6_INC_STATS(&init_net, ip6_dst_idev(dst),
IPSTATS_MIB_OUTNOROUTES);
IP6_INC_STATS(net, ip6_dst_idev(dst), IPSTATS_MIB_OUTNOROUTES);
LIMIT_NETDEBUG(KERN_DEBUG "ip6_route_me_harder: No more route.\n");
dst_release(dst);
return -EINVAL;
Expand Down

0 comments on commit eef9d90

Please sign in to comment.