Commit 466c9b3
netfilter: nf_tables: prepare nft audit for set element compaction
nftables audit log format emits the number of added/deleted rules, sets,
set elements and so on, to userspace:
table=t1 family=2 entries=4 op=nft_register_set
~~~~~~~~~
At this time, the 'entries' key is the number of transactions that will
be applied.
The upcoming set element compression will coalesce subsequent
adds/deletes to the same set requests in the same transaction
request to conseve memory.
Without this patch, we'd under-report the number of altered elements.
Increment the audit counter by the number of elements to keep the reported
entries value the same.
Without this, nft_audit.sh selftest fails because the recorded
(expected) entries key is smaller than the expected one.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>1 parent a8ee6b9 commit 466c9b3
1 file changed
+18
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10398 | 10398 | | |
10399 | 10399 | | |
10400 | 10400 | | |
| 10401 | + | |
| 10402 | + | |
| 10403 | + | |
| 10404 | + | |
| 10405 | + | |
| 10406 | + | |
| 10407 | + | |
| 10408 | + | |
| 10409 | + | |
| 10410 | + | |
| 10411 | + | |
| 10412 | + | |
| 10413 | + | |
| 10414 | + | |
10401 | 10415 | | |
10402 | | - | |
| 10416 | + | |
10403 | 10417 | | |
| 10418 | + | |
10404 | 10419 | | |
10405 | 10420 | | |
10406 | 10421 | | |
| |||
10410 | 10425 | | |
10411 | 10426 | | |
10412 | 10427 | | |
10413 | | - | |
| 10428 | + | |
10414 | 10429 | | |
10415 | 10430 | | |
10416 | 10431 | | |
| |||
10569 | 10584 | | |
10570 | 10585 | | |
10571 | 10586 | | |
10572 | | - | |
| 10587 | + | |
10573 | 10588 | | |
10574 | 10589 | | |
10575 | 10590 | | |
| |||
0 commit comments