[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <55FAE4EA.9060402@6wind.com>
Date: Thu, 17 Sep 2015 18:06:02 +0200
From: Nicolas Dichtel <nicolas.dichtel@...nd.com>
To: "Eric W. Biederman" <ebiederm@...ssion.com>,
Pablo Neira Ayuso <pablo@...filter.org>,
David Miller <davem@...emloft.net>
Cc: netfilter-devel@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH next 22/30] ipv6: Cache net in ip6_output
Le 16/09/2015 03:04, Eric W. Biederman a écrit :
> Keep net in a local variable so I can use it in NF_HOOK_COND
> when I pass struct net to all of the netfilter hooks.
>
> Signed-off-by: "Eric W. Biederman" <ebiederm@...ssion.com>
> ---
> net/ipv6/ip6_output.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c
> index 12d0166a64cd..8cab909b181e 100644
> --- a/net/ipv6/ip6_output.c
> +++ b/net/ipv6/ip6_output.c
> @@ -135,9 +135,9 @@ int ip6_output(struct sock *sk, struct sk_buff *skb)
> {
> struct net_device *dev = skb_dst(skb)->dev;
> struct inet6_dev *idev = ip6_dst_idev(skb_dst(skb));
> + struct net *net = dev_net(dev);
nit: same here for the blank line.
> if (unlikely(idev->cnf.disable_ipv6)) {
> - IP6_INC_STATS(dev_net(dev), idev,
> - IPSTATS_MIB_OUTDISCARDS);
> + IP6_INC_STATS(net, idev, IPSTATS_MIB_OUTDISCARDS);
> kfree_skb(skb);
> return 0;
> }
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists