]> git.ipfire.org Git - thirdparty/systemd.git/commit
resolved: introduce dns_transaction_key() helper for getting RR key for transaction
authorLennart Poettering <lennart@poettering.net>
Tue, 27 Oct 2020 17:33:29 +0000 (18:33 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 9 Feb 2021 16:52:19 +0000 (17:52 +0100)
commit42df95324790b4045cea92111e5ff89dc040efce
tree1404e3c1000c2d7e994f0a230dd0b25cef44742f
parent1a6cd0206bb865d5d087dd5e44d226f0c5e24294
resolved: introduce dns_transaction_key() helper for getting RR key for transaction

This is a simple search&replace excercise: instead of accessing the
"key" field of the transaction directly, let's use a small inline helper
that does this for us.

This appears pointless for now, but this will become useful later when
we introduce "bypass" transactions, that reuse the original client DNS
packet for queries instead of synthesizing a packet of our own. In that
case transactions either have regular "key" field initialized as before,
or the "bypass" packet field instead. The new dns_transaction_key()
helper allows us to hide the differences for most cases as we can later
teach it to access the "bypass" packet's question key transparently.

No change in behaviour.
src/resolve/resolved-dns-transaction.c
src/resolve/resolved-dns-transaction.h