Netfilter-Devel Archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Jason Xing <kerneljasonxing@gmail.com>
Cc: kadlec@netfilter.org, netfilter-devel@vger.kernel.org,
	coreteam@netfilter.org, Jason Xing <kernelxing@tencent.com>
Subject: Re: [PATCH net-next 0/3] netfilter: use NF_DROP instead of -NF_DROP
Date: Mon, 25 Mar 2024 10:33:56 +0100	[thread overview]
Message-ID: <ZgFFBK6M713zwzB0@calendula> (raw)
In-Reply-To: <CAL+tcoAfZh7uGp5EsRvrSpe3mDjmWzSg-sT_4_r9es9iU4Xxdw@mail.gmail.com>

On Mon, Mar 25, 2024 at 05:31:19PM +0800, Jason Xing wrote:
> On Mon, Mar 25, 2024 at 5:19 PM Pablo Neira Ayuso <pablo@netfilter.org> wrote:
> >
> > On Mon, Mar 25, 2024 at 11:19:42AM +0800, Jason Xing wrote:
> > > From: Jason Xing <kernelxing@tencent.com>
> > >
> > > Just simply replace the -NF_DROP with NF_DROP since it is just zero.
> >
> > Single patch for this should be fine, thanks.
> 
> Okay, I thought every patch should be atomic, so I splitted one into
> three. I will squash them :)

One patch for logical update, patch description is the same for them all.

> > There are spots where this happens, and it is not obvious, such as nf_conntrack_in()
> >
> >         if (protonum == IPPROTO_ICMP || protonum == IPPROTO_ICMPV6) {
> >                 ret = nf_conntrack_handle_icmp(tmpl, skb, dataoff,
> >                                                protonum, state);
> >                 if (ret <= 0) {
> >                         ret = -ret;
> 
> Yep, it's not that obvious.
> 
> >                         goto out;
> >                 }
> >
> > removing signed zero seems more in these cases look more complicated.
> 
> Yes, so I have no intention to touch them all. The motivation of this
> patch is that I traced back to the use of NF_DROP in history and found
> out something strange.

Yes, it looks like something was trying to be fixed not in the right way.

> I will send a v2 patch soon.

Thanks.

      reply	other threads:[~2024-03-25  9:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-25  3:19 [PATCH net-next 0/3] netfilter: use NF_DROP instead of -NF_DROP Jason Xing
2024-03-25  3:19 ` [PATCH net-next 1/3] netfilter: using NF_DROP in test statement in nf_conntrack_in() Jason Xing
2024-03-25  3:19 ` [PATCH net-next 2/3] netfilter: use NF_DROP in iptable_filter_table_init() Jason Xing
2024-03-25  3:19 ` [PATCH net-next 3/3] netfilter: use NF_DROP in ip6table_filter_table_init() Jason Xing
2024-03-25  9:19 ` [PATCH net-next 0/3] netfilter: use NF_DROP instead of -NF_DROP Pablo Neira Ayuso
2024-03-25  9:31   ` Jason Xing
2024-03-25  9:33     ` Pablo Neira Ayuso [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=ZgFFBK6M713zwzB0@calendula \
    --to=pablo@netfilter.org \
    --cc=coreteam@netfilter.org \
    --cc=kadlec@netfilter.org \
    --cc=kerneljasonxing@gmail.com \
    --cc=kernelxing@tencent.com \
    --cc=netfilter-devel@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 read-only IMAP folder(s) and NNTP newsgroup(s).