diff options
| author | Fernando Fernandez Mancera <fmancera@suse.de> | 2025-09-19 14:40:43 +0200 |
|---|---|---|
| committer | Florian Westphal <fw@strlen.de> | 2025-09-24 11:50:28 +0200 |
| commit | 09efbac953f6f076a07735f9ba885148d4796235 (patch) | |
| tree | f72fdb83f9becb5697dbfd997b868c9645ea4b03 /rust/helpers/platform.c | |
| parent | 134121bfd99a06d44ef5ba15a9beb075297c0821 (diff) | |
netfilter: nfnetlink: reset nlh pointer during batch replay
During a batch replay, the nlh pointer is not reset until the parsing of
the commands. Since commit bf2ac490d28c ("netfilter: nfnetlink: Handle
ACK flags for batch messages") that is problematic as the condition to
add an ACK for batch begin will evaluate to true even if NLM_F_ACK
wasn't used for batch begin message.
If there is an error during the command processing, netlink is sending
an ACK despite that. This misleads userspace tools which think that the
return code was 0. Reset the nlh pointer to the original one when a
replay is triggered.
Fixes: bf2ac490d28c ("netfilter: nfnetlink: Handle ACK flags for batch messages")
Signed-off-by: Fernando Fernandez Mancera <fmancera@suse.de>
Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'rust/helpers/platform.c')
0 files changed, 0 insertions, 0 deletions
