All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Xing <kerneljasonxing@gmail.com>
To: pablo@netfilter.org, kadlec@netfilter.org
Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
	kerneljasonxing@gmail.com, Jason Xing <kernelxing@tencent.com>
Subject: [PATCH net-next 3/3] netfilter: use NF_DROP in ip6table_filter_table_init()
Date: Mon, 25 Mar 2024 11:19:45 +0800	[thread overview]
Message-ID: <20240325031945.15760-4-kerneljasonxing@gmail.com> (raw)
In-Reply-To: <20240325031945.15760-1-kerneljasonxing@gmail.com>

From: Jason Xing <kernelxing@tencent.com>

There is no need to use the negative -NF_DROP because the definition
is just zero.

Signed-off-by: Jason Xing <kernelxing@tencent.com>
---
 net/ipv6/netfilter/ip6table_filter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv6/netfilter/ip6table_filter.c b/net/ipv6/netfilter/ip6table_filter.c
index df785ebda0ca..e8992693e14a 100644
--- a/net/ipv6/netfilter/ip6table_filter.c
+++ b/net/ipv6/netfilter/ip6table_filter.c
@@ -43,7 +43,7 @@ static int ip6table_filter_table_init(struct net *net)
 		return -ENOMEM;
 	/* Entry 1 is the FORWARD hook */
 	((struct ip6t_standard *)repl->entries)[1].target.verdict =
-		forward ? -NF_ACCEPT - 1 : -NF_DROP - 1;
+		forward ? -NF_ACCEPT - 1 : NF_DROP - 1;
 
 	err = ip6t_register_table(net, &packet_filter, repl, filter_ops);
 	kfree(repl);
-- 
2.37.3


  parent reply	other threads:[~2024-03-25  3:20 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 ` Jason Xing [this message]
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

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=20240325031945.15760-4-kerneljasonxing@gmail.com \
    --to=kerneljasonxing@gmail.com \
    --cc=coreteam@netfilter.org \
    --cc=kadlec@netfilter.org \
    --cc=kernelxing@tencent.com \
    --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.