6458bec5ae2e29c6b0ffec0dab32ac1f8dd29678
[openwrt/staging/yousong.git] /
1 From 34e26e14c5e0fb2d5f05f67858319c9db2058333 Mon Sep 17 00:00:00 2001
2 From: Simon Kelley <simon@thekelleys.org.uk>
3 Date: Thu, 10 May 2018 20:54:57 +0100
4 Subject: [PATCH 05/17] Retry query to other servers on receipt of SERVFAIL
5 rcode.
6
7 Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
8 ---
9 src/forward.c | 2 +-
10 1 file changed, 1 insertion(+), 1 deletion(-)
11
12 --- a/src/forward.c
13 +++ b/src/forward.c
14 @@ -817,7 +817,7 @@ void reply_query(int fd, int family, tim
15
16 /* Note: if we send extra options in the EDNS0 header, we can't recreate
17 the query from the reply. */
18 - if (RCODE(header) == REFUSED &&
19 + if ((RCODE(header) == REFUSED || RCODE(header) == SERVFAIL) &&
20 forward->forwardall == 0 &&
21 !(forward->flags & FREC_HAS_EXTRADATA))
22 /* for broken servers, attempt to send to another one. */