2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 05:28:00 +00:00

fix: dig - always set the default port when doing a UDP query

This commit ensures that the port is set before attempting a UDP
query. Before that a situation could appear when previous query have
completed over a different transport (that uses a dedicated port) and
then a UDP query will be attempted over the port of the previous
transport.

Closes: #4984.

Merge branch 'artem-debian-bug-1059582' into 'main'

See merge request isc-projects/bind9!9618
This commit is contained in:
Artem Boldariev 2024-10-10 19:05:54 +00:00
commit 0699cb9726

View File

@ -3278,6 +3278,10 @@ start_udp(dig_query_t *query) {
return;
}
if (!port_set) {
port = 53;
}
result = get_address(query->servname, port, &query->sockaddr);
if (result != ISC_R_SUCCESS) {
/* This servname doesn't have an address. */