bind9/lib
Michał Kępień 457b666c6f Fix destination port extraction for client queries
The current logic for determining the address of the socket to which a
client sent its query is:

 1. Get the address:port tuple from the netmgr handle using
    isc_nmhandle_localaddr().

 2. Convert the address:port tuple from step 1 into an isc_netaddr_t
    using isc_netaddr_fromsockaddr().

 3. Convert the address from step 2 back into a socket address with the
    port set to 0 using isc_sockaddr_fromnetaddr().

Note that the port number (readily available in the netmgr handle) is
needlessly lost in the process, preventing it from being recorded in
dnstap captures of client traffic produced by named.

Fix by first storing the address:port tuple returned by
isc_nmhandle_localaddr() in client->destsockaddr and then creating an
isc_netaddr_t from that structure.  This allows the port number to be
retained in client->destsockaddr, which is what subsequently gets passed
to dns_dt_send().

(cherry picked from commit 2f945703f2)
2022-06-22 13:46:42 +02:00
..
bind9 prevent a possible buffer overflow in configuration check 2022-05-13 20:29:36 -07:00
dns Update clang to version 14 2022-06-16 18:09:33 +02:00
irs Move all the unit tests to /tests/<libname>/ 2022-05-31 12:06:00 +02:00
isc Update clang to version 14 2022-06-16 18:09:33 +02:00
isccc Update clang to version 14 2022-06-16 18:09:33 +02:00
isccfg Update clang to version 14 2022-06-16 18:09:33 +02:00
ns Fix destination port extraction for client queries 2022-06-22 13:46:42 +02:00
.gitignore The isc/platform.h header has been completely removed 2021-07-06 05:33:48 +00:00
Makefile.am move samples/resolve.c to bin/tests/system 2021-04-16 14:29:43 +02:00