mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 13:50:00 -04:00
After N restarts (currently 3) try again with EDNS0 disabled.
This commit is contained in:
parent
e1e309c63d
commit
57ebb859ee
1 changed files with 12 additions and 1 deletions
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: resolver.c,v 1.137 2000/06/22 21:54:46 tale Exp $ */
|
||||
/* $Id: resolver.c,v 1.138 2000/06/26 21:07:36 explorer Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
|
@ -91,6 +91,12 @@
|
|||
*/
|
||||
#define SEND_BUFFER_SIZE 2048 /* XXXRTH Constant. */
|
||||
|
||||
/*
|
||||
* This defines the maximum number of restarts we will permit before we
|
||||
* disable EDNS0 on the query.
|
||||
*/
|
||||
#define NOEDNS0_RESTARTS 3
|
||||
|
||||
typedef struct fetchctx fetchctx_t;
|
||||
|
||||
typedef struct query {
|
||||
|
|
@ -865,6 +871,11 @@ resquery_send(resquery_t *query) {
|
|||
* Use EDNS0, unless the caller doesn't want it, or we know that
|
||||
* the remote server doesn't like it.
|
||||
*/
|
||||
if (fctx->restarts > NOEDNS0_RESTARTS) {
|
||||
query->options |= DNS_FETCHOPT_NOEDNS0;
|
||||
FCTXTRACE("Too many restarts, disabling EDNS0");
|
||||
}
|
||||
|
||||
if ((query->options & DNS_FETCHOPT_NOEDNS0) == 0) {
|
||||
if ((query->addrinfo->flags & DNS_FETCHOPT_NOEDNS0) == 0) {
|
||||
result = fctx_addopt(fctx->qmessage);
|
||||
|
|
|
|||
Loading…
Reference in a new issue