All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Jan Engelhardt <jengelh@medozas.de>
Cc: Pablo Neira Ayuso <pablo@netfilter.org>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] netfilter: conntrack: account packets drop by tcp_packet()
Date: Mon, 23 Feb 2009 11:49:51 +0100	[thread overview]
Message-ID: <49A27F4F.7050702@trash.net> (raw)
In-Reply-To: <alpine.LSU.2.00.0902231147390.29210@fbirervta.pbzchgretzou.qr>

Jan Engelhardt wrote:
> On Monday 2009-02-23 11:15, Pablo Neira Ayuso wrote:
>> diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
>> index 8b9dbb7..4503727 100644
>> --- a/net/netfilter/nf_conntrack_core.c
>> +++ b/net/netfilter/nf_conntrack_core.c
>> @@ -733,6 +733,8 @@ nf_conntrack_in(struct net *net, u_int8_t pf, unsigned int hooknum,
>> 		nf_conntrack_put(skb->nfct);
>> 		skb->nfct = NULL;
>> 		NF_CT_STAT_INC_ATOMIC(net, invalid);
>> +		if (-ret == NF_DROP)
>> +			NF_CT_STAT_INC_ATOMIC(net, drop);
>> 		return -ret;
>> 	}
>>
> 
> *boggle* Why not just "ret == -NF_DROP"?
> The assumption would be near that "-NF_DROP" is a constant just
> as "NF_DROP" would be, but "-ret" involves an extra instruction
> for negating ret.

Indeed. No need to resend though, I'll fix it up.


  reply	other threads:[~2009-02-23 10:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-23 10:15 [PATCH] netfilter: conntrack: account packets drop by tcp_packet() Pablo Neira Ayuso
2009-02-23 10:48 ` Jan Engelhardt
2009-02-23 10:49   ` Patrick McHardy [this message]
2009-02-24 13:49 ` Patrick McHardy

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=49A27F4F.7050702@trash.net \
    --to=kaber@trash.net \
    --cc=jengelh@medozas.de \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.