dns_server: fix some DOH server issue.

This commit is contained in:
Nick Peng
2023-11-11 23:57:18 +08:00
parent ef806ecc9c
commit 8c06923438
3 changed files with 27 additions and 10 deletions

View File

@@ -717,6 +717,13 @@ static int _config_server(int argc, char *argv[], dns_server_type_t type, int de
server->server_flag = server_flag;
server->ttl = ttl;
server->drop_packet_latency_ms = drop_packet_latency_ms;
if (server->type == DNS_SERVER_HTTPS) {
if (server->path[0] == 0) {
safe_strncpy(server->path, "/", sizeof(server->path));
}
}
dns_conf_server_num++;
tlog(TLOG_DEBUG, "add server %s, flag: %X, ttl: %d", ip, result_flag, ttl);