Repository navigation
Trim and merge audit:dns:* keys like audit:accept:* - #9953
Merged
jasonlyc merged 1 commit intoOct 16, 2026
Merged
Conversation
With dnsmasq_log_allow_redis on, allowed DNS records go to audit:dns:<mac> and audit:dns:system. OldDataCleanSensor had no filter for these keys, so they were never trimmed, and mergeLogs never compacted audit:dns:system. Fixes #9946
jasonlyc
approved these changes
Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #9946.
With
dnsmasq_log_allow_redison, allowed DNS records are written toaudit:dns:<mac>andaudit:dns:system. Two things were missing for these keys:OldDataCleanSensor.registerFilterFunctions: no filter matchedaudit:dns:, soregularCleannever trimmed them. TheauditAcceptfilter now also matchesaudit:dns:, so these keys use the same retention (expire, count and the DNS-flow platform multipliers) asaudit:accept:*. This follows option 1 from the issue, so no new config entry is needed.ACLAuditLogPlugin:audit:dns:systemwas missing from the defaulttouchedKeys, in the constructor and in the reset inmergeLogs. Only per-mac keys were added on write, somergeLogsnever compacted the system key. It's now in both defaults.Test:
test/test_audit_dns_retention.jsloads both sensors through proxyquire. Every module they require is replaced by a stub, exceptConstants.jsandCommonKeys.js.OldDataCleanSensor:audit:dns:systemandaudit:dns:<mac>match exactly one filter,auditAccept.audit:accept:*andaudit:drop:*keep their filters.ACLAuditLogPlugin.mergeLogs: with a stubrclient, two merges in a row both readaudit:dns:system. The second merge checks the resettouchedKeys.Both tests fail without the fix and pass with it. I ran them with mocha 11 on Node 26, as in #9909.