]> git.ipfire.org Git - thirdparty/bind9.git/commit
Enable logging both "from" and "to" socket
authorMichał Kępień <michal@isc.org>
Tue, 31 Dec 2024 04:40:48 +0000 (05:40 +0100)
committerMichał Kępień <michal@isc.org>
Tue, 31 Dec 2024 04:40:48 +0000 (05:40 +0100)
commitbafa5d3c2eae962eb2ccd58ea8196149371cb974
tree7b6df07067318fa7f2feb0ebf5e43702c0a652f5
parent05d69bd7a44d3b28ad4a993f97656ad8de115178
Enable logging both "from" and "to" socket

Change the function prototype for dns_message_logfmtpacket() so that it
takes two isc_sockaddr_t parameters: one for the sending side and
another one for the receiving side.  This enables debug messages to be
more precise.

Also adjust the function prototype for logfmtpacket() accordingly.
Unlike dns_message_logfmtpacket(), this function must not require both
'from' and 'to' parameters to be non-NULL as it is still going to be
used by dns_message_logpacket(), which only provides a single socket
address.  Adjust its log format to handle both of these cases properly.

Adjust both dns_message_logfmtpacket() call sites accordingly, without
actually providing the second socket address yet.  (This causes the
revised REQUIRE() assertion in dns_message_logfmtpacket() to fail; the
issue will be addressed in a separate commit.)
lib/dns/include/dns/message.h
lib/dns/message.c
lib/dns/resolver.c