netfilter: nf_tables: Deduplicate nft_register_obj audit logs
authorPhil Sutter <phil@nwl.cc>
Sat, 23 Sep 2023 01:53:50 +0000 (03:53 +0200)
committerFlorian Westphal <fw@strlen.de>
Wed, 4 Oct 2023 13:57:06 +0000 (15:57 +0200)
commit0d880dc6f032e0b541520e9926f398a77d3d433c
treeaf98d737bcc503a93dfe3aaebcd214393d18816d
parent203bb9d39866d3c5a8135433ce3742fe4f9d5741
netfilter: nf_tables: Deduplicate nft_register_obj audit logs

When adding/updating an object, the transaction handler emits suitable
audit log entries already, the one in nft_obj_notify() is redundant. To
fix that (and retain the audit logging from objects' 'update' callback),
Introduce an "audit log free" variant for internal use.

Fixes: c520292f29b8 ("audit: log nftables configuration change events once per table")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Reviewed-by: Richard Guy Briggs <rgb@redhat.com>
Acked-by: Paul Moore <paul@paul-moore.com> (Audit)
Signed-off-by: Florian Westphal <fw@strlen.de>
net/netfilter/nf_tables_api.c
tools/testing/selftests/netfilter/nft_audit.sh