From 8f9bd615053cd13aba82a111ec20bb79d25a2d1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= Date: Sat, 27 Mar 2021 23:16:09 +0000 Subject: [PATCH] Correct missing SERV_DO_DNSSEC flag, add new spot One change to server_test_type forgot to set SERV_DO_DNSSEC. One new place still can be reused. Fixes commit e10a9239e103a2f23f1e758effba624740a4842d, thanks to Xingcong Li for spotting it. --- src/forward.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/forward.c b/src/forward.c index 1ce91a2..2c0ef7f 100644 --- a/src/forward.c +++ b/src/forward.c @@ -1082,7 +1082,7 @@ void reply_query(int fd, time_t now) while (1) { - if (server_test_type(start, domain, type, 0)) + if (server_test_type(start, domain, type, SERV_DO_DNSSEC)) { new_server = start; if (server == start) @@ -2482,10 +2482,7 @@ static struct frec *lookup_frec(unsigned short id, int fd, void *hash) type = f->sentto->flags & SERV_TYPE; s = f->sentto; do { - if ((type == (s->flags & SERV_TYPE)) && - (type != SERV_HAS_DOMAIN || - (s->domain && hostname_isequal(f->sentto->domain, s->domain))) && - !(s->flags & (SERV_LITERAL_ADDRESS | SERV_LOOP)) && + if (server_test_type(s, f->sentto->domain, type, 0) && s->sfd && s->sfd->fd == fd) return f;