From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Cc: davem@davemloft.net, netdev@vger.kernel.org
Subject: [PATCH net 1/5] netfilter: nftables: fix netlink report logic in flowtable and genid
Date: Sat, 31 Oct 2020 19:14:33 +0100 [thread overview]
Message-ID: <20201031181437.12472-2-pablo@netfilter.org> (raw)
In-Reply-To: <20201031181437.12472-1-pablo@netfilter.org>
The netlink report should be sent regardless the available listeners.
Fixes: 84d7fce69388 ("netfilter: nf_tables: export rule-set generation ID")
Fixes: 3b49e2e94e6e ("netfilter: nf_tables: add flow table netlink frontend")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
net/netfilter/nf_tables_api.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 65cb8e3c13d9..9b70e136fb5d 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -7137,7 +7137,7 @@ static void nf_tables_flowtable_notify(struct nft_ctx *ctx,
GFP_KERNEL);
kfree(buf);
- if (ctx->report &&
+ if (!ctx->report &&
!nfnetlink_has_listeners(ctx->net, NFNLGRP_NFTABLES))
return;
@@ -7259,7 +7259,7 @@ static void nf_tables_gen_notify(struct net *net, struct sk_buff *skb,
audit_log_nfcfg("?:0;?:0", 0, net->nft.base_seq,
AUDIT_NFT_OP_GEN_REGISTER, GFP_KERNEL);
- if (nlmsg_report(nlh) &&
+ if (!nlmsg_report(nlh) &&
!nfnetlink_has_listeners(net, NFNLGRP_NFTABLES))
return;
--
2.20.1
next prev parent reply other threads:[~2020-10-31 18:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-31 18:14 [PATCH net 0/5] Netfilter fixes for net Pablo Neira Ayuso
2020-10-31 18:14 ` Pablo Neira Ayuso [this message]
2020-10-31 18:14 ` [PATCH net 2/5] wireguard: selftests: check that route_me_harder packets use the right sk Pablo Neira Ayuso
2020-10-31 18:14 ` [PATCH net 3/5] netfilter: use actual socket sk rather than skb sk when routing harder Pablo Neira Ayuso
2020-10-31 18:14 ` [PATCH net 4/5] netfilter: nf_tables: missing validation from the abort path Pablo Neira Ayuso
2020-10-31 18:14 ` [PATCH net 5/5] netfilter: ipset: Update byte and packet counters regardless of whether they match Pablo Neira Ayuso
2020-11-01 1:02 ` [PATCH net 0/5] Netfilter fixes for net Jakub Kicinski
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=20201031181437.12472-2-pablo@netfilter.org \
--to=pablo@netfilter.org \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--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 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.