mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-26 11:22:52 -04:00
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.
(cherry picked from commit e390ed4421)
This commit is contained in:
parent
03b5bde1d4
commit
cecd3a75ec
1 changed files with 4 additions and 0 deletions
|
|
@ -3308,6 +3308,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. */
|
||||
|
|
|
|||
Loading…
Reference in a new issue