netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Jeff Barnhill <0xeffeff@gmail.com>, netdev@vger.kernel.org
Subject: Re: ip6_forward / NF_HOOK and counters
Date: Fri, 30 Mar 2018 09:06:52 -0600	[thread overview]
Message-ID: <d7af6c31-1217-ec43-b415-7271ab8f318f@gmail.com> (raw)
In-Reply-To: <CAL6e_pesVesD+SEC5FQXhHLLq-oPJZNrwiMgjX=ynm0GX4jEZw@mail.gmail.com>

On 3/26/18 7:35 PM, Jeff Barnhill wrote:
> At the end of ip6_forward(), is there a good reason why
> IPSTATS_MIB_OUTFORWDATAGRAMS and IPSTATS_MIB_OUTOCTETS are incremented
> before the NF_HOOK?  If the hook steals or drops the packet, this
> counts still go up, which seems incorrect.
> 
> v4/ip_forward() increments these counters in ip_forward_finish().  It
> seems that v6 should do it in ip6_forward_finish() ?? Thoughts?
> 
> Jeff
> 

I agree and think it is part of the alignment between IPv4 and IPv6.

      reply	other threads:[~2018-03-30 15:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-27  1:35 ip6_forward / NF_HOOK and counters Jeff Barnhill
2018-03-30 15:06 ` David Ahern [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d7af6c31-1217-ec43-b415-7271ab8f318f@gmail.com \
    --to=dsahern@gmail.com \
    --cc=0xeffeff@gmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).