mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-01 23:25:38 +00:00
2564. [bug] Only take EDNS fallback steps when processing timeouts.
[RT #19405]
This commit is contained in:
5
CHANGES
5
CHANGES
@@ -2,9 +2,8 @@
|
|||||||
dns_rdata_hip_first(), dns_rdata_hip_next()
|
dns_rdata_hip_first(), dns_rdata_hip_next()
|
||||||
and dns_rdata_hip_current(). [RT #19384]
|
and dns_rdata_hip_current(). [RT #19384]
|
||||||
|
|
||||||
2564. [bug] 'named' was treating a TCP retry as a timeout when
|
2564. [bug] Only take EDNS fallback steps when processing timeouts.
|
||||||
deciding whether to perform a EDNS fallback step.
|
[RT #19405]
|
||||||
[RT #19393]
|
|
||||||
|
|
||||||
2563. [bug] Dig could leak a socket causing it to wait forever
|
2563. [bug] Dig could leak a socket causing it to wait forever
|
||||||
to exit. [RT #19359]
|
to exit. [RT #19359]
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* PERFORMANCE OF THIS SOFTWARE.
|
* PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: resolver.c,v 1.392 2009/02/25 22:46:05 marka Exp $ */
|
/* $Id: resolver.c,v 1.393 2009/02/27 23:01:48 marka Exp $ */
|
||||||
|
|
||||||
/*! \file */
|
/*! \file */
|
||||||
|
|
||||||
@@ -229,6 +229,7 @@ struct fetchctx {
|
|||||||
* is used for EDNS0 black hole detection.
|
* is used for EDNS0 black hole detection.
|
||||||
*/
|
*/
|
||||||
unsigned int timeouts;
|
unsigned int timeouts;
|
||||||
|
|
||||||
/*%
|
/*%
|
||||||
* Look aside state for DS lookups.
|
* Look aside state for DS lookups.
|
||||||
*/
|
*/
|
||||||
@@ -270,6 +271,7 @@ struct fetchctx {
|
|||||||
unsigned int adberr;
|
unsigned int adberr;
|
||||||
unsigned int findfail;
|
unsigned int findfail;
|
||||||
unsigned int valfail;
|
unsigned int valfail;
|
||||||
|
isc_boolean_t timeout;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define FCTX_MAGIC ISC_MAGIC('F', '!', '!', '!')
|
#define FCTX_MAGIC ISC_MAGIC('F', '!', '!', '!')
|
||||||
@@ -1639,9 +1641,8 @@ resquery_send(resquery_t *query) {
|
|||||||
query->options |= DNS_FETCHOPT_NOEDNS0;
|
query->options |= DNS_FETCHOPT_NOEDNS0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Handle UDP timeouts by reducing the UDP response size to 512
|
* Handle timeouts by reducing the UDP response size to 512 bytes
|
||||||
* bytes then if that doesn't work disabling EDNS (includes DO)
|
* then if that doesn't work disabling EDNS (includes DO) and CD.
|
||||||
* and CD.
|
|
||||||
*
|
*
|
||||||
* These timeout can be due to:
|
* These timeout can be due to:
|
||||||
* * broken nameservers that don't respond to EDNS queries.
|
* * broken nameservers that don't respond to EDNS queries.
|
||||||
@@ -1653,7 +1654,7 @@ resquery_send(resquery_t *query) {
|
|||||||
* or CD.
|
* or CD.
|
||||||
* * packet loss / link outage.
|
* * packet loss / link outage.
|
||||||
*/
|
*/
|
||||||
if ((query->options & DNS_FETCHOPT_TCP) == 0) {
|
if (fctx->timeout) {
|
||||||
if ((triededns512(fctx, &query->addrinfo->sockaddr) ||
|
if ((triededns512(fctx, &query->addrinfo->sockaddr) ||
|
||||||
fctx->timeouts >= (MAX_EDNS0_TIMEOUTS * 2)) &&
|
fctx->timeouts >= (MAX_EDNS0_TIMEOUTS * 2)) &&
|
||||||
(query->options & DNS_FETCHOPT_NOEDNS0) == 0) {
|
(query->options & DNS_FETCHOPT_NOEDNS0) == 0) {
|
||||||
@@ -1666,6 +1667,7 @@ resquery_send(resquery_t *query) {
|
|||||||
fctx->reason = "reducing the advertised EDNS UDP "
|
fctx->reason = "reducing the advertised EDNS UDP "
|
||||||
"packet size to 512 octets";
|
"packet size to 512 octets";
|
||||||
}
|
}
|
||||||
|
fctx->timeout = ISC_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -3012,6 +3014,7 @@ fctx_timeout(isc_task_t *task, isc_event_t *event) {
|
|||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
|
|
||||||
fctx->timeouts++;
|
fctx->timeouts++;
|
||||||
|
fctx->timeout = ISC_TRUE;
|
||||||
/*
|
/*
|
||||||
* We could cancel the running queries here, or we could let
|
* We could cancel the running queries here, or we could let
|
||||||
* them keep going. Since we normally use separate sockets for
|
* them keep going. Since we normally use separate sockets for
|
||||||
@@ -3358,6 +3361,7 @@ fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type,
|
|||||||
fctx->reason = NULL;
|
fctx->reason = NULL;
|
||||||
fctx->rand_buf = 0;
|
fctx->rand_buf = 0;
|
||||||
fctx->rand_bits = 0;
|
fctx->rand_bits = 0;
|
||||||
|
fctx->timeout = ISC_FALSE;
|
||||||
|
|
||||||
dns_name_init(&fctx->nsname, NULL);
|
dns_name_init(&fctx->nsname, NULL);
|
||||||
fctx->nsfetch = NULL;
|
fctx->nsfetch = NULL;
|
||||||
@@ -5888,6 +5892,7 @@ resquery_response(isc_task_t *task, isc_event_t *event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fctx->timeouts = 0;
|
fctx->timeouts = 0;
|
||||||
|
fctx->timeout = ISC_FALSE;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* XXXRTH We should really get the current time just once. We
|
* XXXRTH We should really get the current time just once. We
|
||||||
|
Reference in New Issue
Block a user