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>
This commit is contained in:
parent
4ef079ccc1
commit
eef9d90dcd
|
@ -12,6 +12,7 @@
|
||||||
|
|
||||||
int ip6_route_me_harder(struct sk_buff *skb)
|
int ip6_route_me_harder(struct sk_buff *skb)
|
||||||
{
|
{
|
||||||
|
struct net *net = dev_net(skb->dst->dev);
|
||||||
struct ipv6hdr *iph = ipv6_hdr(skb);
|
struct ipv6hdr *iph = ipv6_hdr(skb);
|
||||||
struct dst_entry *dst;
|
struct dst_entry *dst;
|
||||||
struct flowi fl = {
|
struct flowi fl = {
|
||||||
|
@ -23,7 +24,7 @@ int ip6_route_me_harder(struct sk_buff *skb)
|
||||||
.saddr = iph->saddr, } },
|
.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
|
#ifdef CONFIG_XFRM
|
||||||
if (!(IP6CB(skb)->flags & IP6SKB_XFRM_TRANSFORMED) &&
|
if (!(IP6CB(skb)->flags & IP6SKB_XFRM_TRANSFORMED) &&
|
||||||
|
@ -33,8 +34,7 @@ int ip6_route_me_harder(struct sk_buff *skb)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (dst->error) {
|
if (dst->error) {
|
||||||
IP6_INC_STATS(&init_net, ip6_dst_idev(dst),
|
IP6_INC_STATS(net, ip6_dst_idev(dst), IPSTATS_MIB_OUTNOROUTES);
|
||||||
IPSTATS_MIB_OUTNOROUTES);
|
|
||||||
LIMIT_NETDEBUG(KERN_DEBUG "ip6_route_me_harder: No more route.\n");
|
LIMIT_NETDEBUG(KERN_DEBUG "ip6_route_me_harder: No more route.\n");
|
||||||
dst_release(dst);
|
dst_release(dst);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
Loading…
Reference in New Issue