mirror of
https://github.com/isc-projects/bind9.git
synced 2026-07-15 08:21:02 -04:00
Count distinct destinations in selfpointedglue dnstap checks
Tolerates retransmissions, which would inflate a raw line count.
Assisted-by: Claude:claude-opus-4-8
(cherry picked from commit aac9cc40a8)
This commit is contained in:
parent
61740468c4
commit
e5505dae77
1 changed files with 5 additions and 2 deletions
|
|
@ -34,8 +34,11 @@ def extract_dnstap(ns, expectedlen):
|
|||
)
|
||||
|
||||
lines = dnstapread.out.splitlines()
|
||||
assert expectedlen == len(lines)
|
||||
return list(map(line_to_ips_and_queries, lines))
|
||||
# Count distinct (destination, query) pairs, not raw lines: under load
|
||||
# named may retransmit, adding identical entries.
|
||||
ips_and_queries = list(dict.fromkeys(map(line_to_ips_and_queries, lines)))
|
||||
assert expectedlen == len(ips_and_queries)
|
||||
return ips_and_queries
|
||||
|
||||
|
||||
# Because DNSTAP doesn't have ordering guarantee, the order doesn't matter here.
|
||||
|
|
|
|||
Loading…
Reference in a new issue