]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selftests: netfilter: Fix nft_audit.sh for newer nft binaries
authorPhil Sutter <phil@nwl.cc>
Thu, 26 Sep 2024 16:56:31 +0000 (18:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Oct 2024 10:00:05 +0000 (12:00 +0200)
commitc93cb0ccdc1337650dc13544b2a900d845bb58e2
treed4115c8cd8707a64c1d92f8fe934cfca710ae7b1
parent34d7525646da7228a50592f1f4a0ff8305a78d7c
selftests: netfilter: Fix nft_audit.sh for newer nft binaries

[ Upstream commit 8a89015644513ef69193a037eb966f2d55fe385a ]

As a side-effect of nftables' commit dbff26bfba833 ("cache: consolidate
reset command"), audit logs changed when more objects were reset than
fit into a single netlink message.

Since the objects' distribution in netlink messages is not relevant,
implement a summarizing function which combines repeated audit logs into
a single one with summed up 'entries=' value.

Fixes: 203bb9d39866 ("selftests: netfilter: Extend nft_audit.sh")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/net/netfilter/nft_audit.sh