mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
Don't have dig (et al) fall back to TCP mode after non-responsive UDP
attempts.
This commit is contained in:
@@ -15,7 +15,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: dighost.c,v 1.58 2000/06/26 00:57:18 gson Exp $ */
|
/* $Id: dighost.c,v 1.59 2000/06/26 21:28:17 mws Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Notice to programmers: Do not use this code as an example of how to
|
* Notice to programmers: Do not use this code as an example of how to
|
||||||
@@ -1251,7 +1251,7 @@ send_udp(dig_lookup_t *lookup) {
|
|||||||
/* connect_timeout is used for both UDP recieves and TCP connects. */
|
/* connect_timeout is used for both UDP recieves and TCP connects. */
|
||||||
static void
|
static void
|
||||||
connect_timeout(isc_task_t *task, isc_event_t *event) {
|
connect_timeout(isc_task_t *task, isc_event_t *event) {
|
||||||
dig_lookup_t *lookup=NULL, *next=NULL;
|
dig_lookup_t *lookup=NULL;
|
||||||
dig_query_t *q=NULL;
|
dig_query_t *q=NULL;
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
isc_buffer_t *b=NULL;
|
isc_buffer_t *b=NULL;
|
||||||
@@ -1284,24 +1284,12 @@ connect_timeout(isc_task_t *task, isc_event_t *event) {
|
|||||||
q->lookup->textname,
|
q->lookup->textname,
|
||||||
q->lookup->retries-1);
|
q->lookup->retries-1);
|
||||||
else {
|
else {
|
||||||
if (lookup->tcp_mode) {
|
printf(";; Connection to "
|
||||||
printf(";; Connection to "
|
"server %.*s "
|
||||||
"server %.*s "
|
"for %s timed out. "
|
||||||
"for %s timed out. "
|
"Giving up.\n",
|
||||||
"Giving up.\n",
|
(int)r.length, r.base,
|
||||||
(int)r.length, r.base,
|
q->lookup->textname);
|
||||||
q->lookup->textname);
|
|
||||||
} else {
|
|
||||||
printf(";; Connection to "
|
|
||||||
"server %.*s "
|
|
||||||
"for %s timed out. "
|
|
||||||
"Trying TCP.\n",
|
|
||||||
(int)r.length, r.base,
|
|
||||||
q->lookup->textname);
|
|
||||||
next = requeue_lookup
|
|
||||||
(lookup,ISC_TRUE);
|
|
||||||
next->tcp_mode = ISC_TRUE;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
isc_socket_cancel(q->sock, task,
|
isc_socket_cancel(q->sock, task,
|
||||||
|
Reference in New Issue
Block a user