netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nf v1] netfilter: netlink: Report extack policy errors for batched ops
@ 2024-11-01 14:32 Donald Hunter
  2024-11-05 12:29 ` Simon Horman
  0 siblings, 1 reply; 2+ messages in thread
From: Donald Hunter @ 2024-11-01 14:32 UTC (permalink / raw)
  To: Pablo Neira Ayuso, Jozsef Kadlecsik, David S . Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, netfilter-devel,
	netdev
  Cc: donald.hunter, Donald Hunter

The nftables batch processing does not currently populate extack with
policy errors. Fix this by passing extack when parsing batch messages.

Signed-off-by: Donald Hunter <donald.hunter@gmail.com>
---
 net/netfilter/nfnetlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/netfilter/nfnetlink.c b/net/netfilter/nfnetlink.c
index 7784ec094097..e598a2a252b0 100644
--- a/net/netfilter/nfnetlink.c
+++ b/net/netfilter/nfnetlink.c
@@ -517,7 +517,7 @@ static void nfnetlink_rcv_batch(struct sk_buff *skb, struct nlmsghdr *nlh,
 			err = nla_parse_deprecated(cda,
 						   ss->cb[cb_id].attr_count,
 						   attr, attrlen,
-						   ss->cb[cb_id].policy, NULL);
+						   ss->cb[cb_id].policy, &extack);
 			if (err < 0)
 				goto ack;
 
-- 
2.47.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-11-05 12:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-01 14:32 [PATCH nf v1] netfilter: netlink: Report extack policy errors for batched ops Donald Hunter
2024-11-05 12:29 ` Simon Horman

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).