aboutsummaryrefslogtreecommitdiff
path: root/src/feature/client/dnsserv.c
diff options
context:
space:
mode:
authorDaniel Winzen <daniel@danwin1210.de>2024-09-24 15:07:59 +0200
committerDaniel Winzen <daniel@danwin1210.de>2024-09-24 15:07:59 +0200
commit3d2f7c3467e7aff545d8e22ffd4153d7598c6d7c (patch)
treed1a787291674e940c4b3879778633a425cd89214 /src/feature/client/dnsserv.c
parenta56350abc8a8c18bfe0b60c751cce5f851db0d3e (diff)
downloadtor-3d2f7c3467e7aff545d8e22ffd4153d7598c6d7c.tar.gz
tor-3d2f7c3467e7aff545d8e22ffd4153d7598c6d7c.zip
Handle empty DNS reply without error as NOERROR
Diffstat (limited to 'src/feature/client/dnsserv.c')
-rw-r--r--src/feature/client/dnsserv.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/feature/client/dnsserv.c b/src/feature/client/dnsserv.c
index f0bb0af100..237a6ee3d3 100644
--- a/src/feature/client/dnsserv.c
+++ b/src/feature/client/dnsserv.c
@@ -319,6 +319,7 @@ evdns_get_orig_address(const struct evdns_server_request *req,
break;
case RESOLVED_TYPE_ERROR:
case RESOLVED_TYPE_ERROR_TRANSIENT:
+ case RESOLVED_TYPE_NOERROR:
/* Addr doesn't matter, since we're not sending it back in the reply.*/
return addr;
default:
@@ -379,6 +380,8 @@ dnsserv_resolved(entry_connection_t *conn,
tor_free(ans);
} else if (answer_type == RESOLVED_TYPE_ERROR) {
err = DNS_ERR_NOTEXIST;
+ } else if (answer_type == RESOLVED_TYPE_NOERROR) {
+ err = DNS_ERR_NONE;
} else { /* answer_type == RESOLVED_TYPE_ERROR_TRANSIENT */
err = DNS_ERR_SERVERFAILED;
}