diff options
author | Simon Kelley <simon@thekelleys.org.uk> | 2021-06-10 21:31:38 +0100 |
---|---|---|
committer | Simon Kelley <simon@thekelleys.org.uk> | 2021-06-10 21:31:38 +0100 |
commit | ff523d0c67ba34e273c9fb307883d87b7ecbeded (patch) | |
tree | a2005d556432a59d1b095fdaf30b96d61d06b1ce | |
parent | 3c93e8eb41952a9c91699386132d6fe83050e9be (diff) | |
download | dnsmasq-ff523d0c67ba34e273c9fb307883d87b7ecbeded.tar.gz |
Fix TCP replies with --domain-needed.
-rw-r--r-- | src/forward.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/forward.c b/src/forward.c index bb356c0..c493baa 100644 --- a/src/forward.c +++ b/src/forward.c @@ -1864,13 +1864,8 @@ unsigned char *tcp_request(int confd, time_t now, (gotname & (F_IPV4 | F_IPV6)) && !strchr(daemon->namebuff, '.') && strlen(daemon->namebuff) != 0) - { - flags = F_NOERR; - break;; - } - - /* Configured answer or no available server. */ - if (lookup_domain(daemon->namebuff, gotname, &first, &last) && !(flags = is_local_answer(now, first, daemon->namebuff))) + flags = F_NOERR; + else if (lookup_domain(daemon->namebuff, gotname, &first, &last) && !(flags = is_local_answer(now, first, daemon->namebuff))) { master = daemon->serverarray[first]; |