netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] netns: correct mib stats in ip6_route_me_harder()
@ 2008-10-15  4:12 Alexey Dobriyan
  2008-10-15  5:55 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey Dobriyan @ 2008-10-15  4:12 UTC (permalink / raw)
  To: davem; +Cc: netdev, den, kaber

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
---

 net/ipv6/netfilter.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/net/ipv6/netfilter.c
+++ b/net/ipv6/netfilter.c
@@ -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 = {
@@ -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) &&
@@ -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;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] netns: correct mib stats in ip6_route_me_harder()
  2008-10-15  4:12 [PATCH] netns: correct mib stats in ip6_route_me_harder() Alexey Dobriyan
@ 2008-10-15  5:55 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2008-10-15  5:55 UTC (permalink / raw)
  To: adobriyan; +Cc: netdev, den, kaber

From: Alexey Dobriyan <adobriyan@gmail.com>
Date: Wed, 15 Oct 2008 08:12:26 +0400

> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>

Applied, thanks a lot.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-10-15  5:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-15  4:12 [PATCH] netns: correct mib stats in ip6_route_me_harder() Alexey Dobriyan
2008-10-15  5:55 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).