]> git.ipfire.org Git - thirdparty/linux.git/commit
audit: add audit_log_nf_skb helper function
authorRicardo Robaina <rrobaina@redhat.com>
Fri, 14 Nov 2025 12:36:16 +0000 (09:36 -0300)
committerPaul Moore <paul@paul-moore.com>
Tue, 16 Dec 2025 16:04:14 +0000 (11:04 -0500)
commitf19590b07cb620be1fcd5474c49515e21a05d406
treeee1512d64f275b0fb7f3bdcbdde39cdd3e11e782
parent4f493a6079b588cf1f04ce5ed6cdad45ab0d53dc
audit: add audit_log_nf_skb helper function

Netfilter code (net/netfilter/nft_log.c and net/netfilter/xt_AUDIT.c)
have to be kept in sync. Both source files had duplicated versions of
audit_ip4() and audit_ip6() functions, which can result in lack of
consistency and/or duplicated work.

This patch adds a helper function in audit.c that can be called by
netfilter code commonly, aiming to improve maintainability and
consistency.

Suggested-by: Florian Westphal <fw@strlen.de>
Suggested-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Ricardo Robaina <rrobaina@redhat.com>
Acked-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Paul Moore <paul@paul-moore.com>
include/linux/audit.h
kernel/audit.c
net/netfilter/nft_log.c
net/netfilter/xt_AUDIT.c