]> git.ipfire.org Git - thirdparty/systemd.git/commit
resolved: handle properly if there are multiple transactions for the same key per...
authorLennart Poettering <lennart@poettering.net>
Thu, 26 Nov 2015 22:51:59 +0000 (23:51 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 26 Nov 2015 23:03:39 +0000 (00:03 +0100)
commitf9ebb22ab4758bc5bbaaf8eeead74b5b4f81d5c3
tree87eed36260c23641f9bb1bb654dcacaa407485ce
parentc3bc53e62459d7e566ffffeade41cd82bc6754f5
resolved: handle properly if there are multiple transactions for the same key per scope

When the zone probing code looks for a transaction to reuse it will
refuse to look at transactions that have been answered from cache or the
zone itself, but insist on the network. This has the effect that there
might be multiple transactions around for the same key on the same
scope. Previously we'd track all transactions in a hashmap, indexed by
the key, which implied that there would be only one transaction per key,
per scope. With this change the hashmap will only store the most recent
transaction per key, and a linked list will be used to track all
transactions per scope, allowing multiple per-key per-scope.

Note that the linked list fields for this actually already existed in
the DnsTransaction structure, but were previously unused.
src/resolve/resolved-dns-scope.c
src/resolve/resolved-dns-scope.h
src/resolve/resolved-dns-transaction.c