[nginx] Resolver: allowed responses with AD bit set.

Maxim Dounin mdounin at mdounin.ru
Sun Jun 16 01:29:27 UTC 2024


details:   http://freenginx.org/hg/nginx/rev/ea0eef2dd12c
branches:  
changeset: 9294:ea0eef2dd12c
user:      Kirill A. Korinsky <kirill at korins.ky>
date:      Sun Jun 16 04:17:27 2024 +0300
description:
Resolver: allowed responses with AD bit set.

diffstat:

 src/core/ngx_resolver.c |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff --git a/src/core/ngx_resolver.c b/src/core/ngx_resolver.c
--- a/src/core/ngx_resolver.c
+++ b/src/core/ngx_resolver.c
@@ -1774,7 +1774,7 @@ ngx_resolver_process_response(ngx_resolv
                    (response->nar_hi << 8) + response->nar_lo);
 
     /* response to a standard query */
-    if ((flags & 0xf870) != 0x8000 || (trunc && tcp)) {
+    if ((flags & 0xf850) != 0x8000 || (trunc && tcp)) {
         ngx_log_error(r->log_level, r->log, 0,
                       "invalid %s DNS response %ui fl:%04Xi",
                       tcp ? "TCP" : "UDP", ident, flags);



More information about the nginx-devel mailing list