bind9/lib/ns
Michał Kępień 2f945703f2 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().
2022-06-22 13:45:46 +02:00
..
include Update clang to version 14 2022-06-16 17:21:11 +02:00
client.c Fix destination port extraction for client queries 2022-06-22 13:45:46 +02:00
hooks.c Move netmgr/uv-compat.h to <isc/uv.h> 2022-05-03 10:02:19 +02:00
interfacemgr.c Fix a race condition between shutdown and route_connected() 2022-06-14 14:31:24 +00:00
listenlist.c Extend TLS context cache with TLS client session cache 2022-05-20 20:13:20 +03:00
log.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
Makefile.am Move all the unit tests to /tests/<libname>/ 2022-05-28 14:53:02 -07:00
notify.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
query.c Assert on unknown isc_quota_attach() return values 2022-06-14 13:13:32 +02:00
server.c Remove the keep-response-order ACL map 2022-02-18 09:16:03 +01:00
sortlist.c Add isc_rwlock around dns_aclenv .localhost and .localnets member 2022-04-04 19:27:00 +02:00
stats.c Update the copyright information in all files in the repository 2022-01-11 09:05:02 +01:00
tests Move all the unit tests to /tests/<libname>/ 2022-05-28 14:53:02 -07:00
update.c Create per-thread task and memory context for zonemgr 2022-04-01 23:50:34 +02:00
xfrout.c DNS name compression does not depend on the EDNS version 2022-06-01 13:00:40 +01:00