From patchwork Wed Oct 15 04:12:26 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Dobriyan X-Patchwork-Id: 4554 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id DA0ECDDDD4 for ; Wed, 15 Oct 2008 15:10:35 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750853AbYJOEJc (ORCPT ); Wed, 15 Oct 2008 00:09:32 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750835AbYJOEJb (ORCPT ); Wed, 15 Oct 2008 00:09:31 -0400 Received: from nf-out-0910.google.com ([64.233.182.185]:11215 "EHLO nf-out-0910.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750834AbYJOEJb (ORCPT ); Wed, 15 Oct 2008 00:09:31 -0400 Received: by nf-out-0910.google.com with SMTP id d3so1134381nfc.21 for ; Tue, 14 Oct 2008 21:09:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=xEwHVmTJqoCU2Wi0JdCGDtCDH3MNBF/3x17KeONQ00A=; b=EVqn0D2+K9b8X9NUrq0Qsi7l0Zrz0NkHnaCWadhMes2l/x6+Xza51lDEJpniDaNCjl /bPMEJWtAWsaBBpvtd7rVDcD6dkPDSlW3fdivvFIBE2R+dneZSG7QRTZsQBHG/UDT3bt /DS84U8zE3BY8plNmeSNH4w56Km1STR6tD9qY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=TGl3lovPWdg/zTrZRIbO75qj1t2l00PgZsOA3zwQniK5Z0vV0vNupKCtK/Cgfm1+z3 3922c0Kptxzt27saiilrtFrVvrTzE/8/vTE9z+zhajEbRfPz7lsag4HwwN4tTgZTIIhO z3rvwt70IIZaPS2HduP7s8OP/J5Nb/YONU/IQ= Received: by 10.210.35.5 with SMTP id i5mr523890ebi.163.1224043769123; Tue, 14 Oct 2008 21:09:29 -0700 (PDT) Received: from localhost (gw.zunet.ru [217.67.117.64]) by mx.google.com with ESMTPS id 5sm7433684nfv.15.2008.10.14.21.09.26 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 14 Oct 2008 21:09:28 -0700 (PDT) Date: Wed, 15 Oct 2008 08:12:26 +0400 From: Alexey Dobriyan To: davem@davemloft.net Cc: netdev@vger.kernel.org, den@openvz.org, kaber@trash.net Subject: [PATCH] netns: correct mib stats in ip6_route_me_harder() Message-ID: <20081015041226.GA24058@x200.localdomain> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Signed-off-by: Alexey Dobriyan --- net/ipv6/netfilter.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 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;