From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net] net/ipv6: Increment OUTxxx counters after netfilter hook Date: Thu, 05 Apr 2018 22:24:53 -0400 (EDT) Message-ID: <20180405.222453.1210479847233171024.davem@davemloft.net> References: <20180405212947.17858-1-0xeffeff@gmail.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, dsahern@gmail.com To: 0xeffeff@gmail.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:35636 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751585AbeDFCYy (ORCPT ); Thu, 5 Apr 2018 22:24:54 -0400 In-Reply-To: <20180405212947.17858-1-0xeffeff@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Jeff Barnhill <0xeffeff@gmail.com> Date: Thu, 5 Apr 2018 21:29:47 +0000 > At the end of ip6_forward(), IPSTATS_MIB_OUTFORWDATAGRAMS and > IPSTATS_MIB_OUTOCTETS are incremented immediately before the NF_HOOK call > for NFPROTO_IPV6 / NF_INET_FORWARD. As a result, these counters get > incremented regardless of whether or not the netfilter hook allows the > packet to continue being processed. This change increments the counters > in ip6_forward_finish() so that it will not happen if the netfilter hook > chooses to terminate the packet, which is similar to how IPv4 works. > > Signed-off-by: Jeff Barnhill <0xeffeff@gmail.com> Yep, this is more consistent with ipv4. Applied, thank you.