netfilter: nfnetlink: Report extack policy errors for batched ops

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>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
Donald Hunter 2024-11-01 14:32:07 +00:00 committed by Pablo Neira Ayuso
parent 544070db6c
commit 3f54959628

View File

@ -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;