Skip to content

Commit

Permalink
dns_client: fix bootstrap dns retry issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
pymumu committed Jul 12, 2023
1 parent 7ff6ae3 commit 2576fdb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/dns_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
#define DNS_TCP_CONNECT_TIMEOUT (5)
#define DNS_QUERY_TIMEOUT (500)
#define DNS_QUERY_RETRY (4)
#define DNS_PENDING_SERVER_RETRY 40
#define DNS_PENDING_SERVER_RETRY 60
#define SOCKET_PRIORITY (6)
#define SOCKET_IP_TOS (IPTOS_LOWDELAY | IPTOS_RELIABILITY)

Expand Down Expand Up @@ -4035,7 +4035,7 @@ static void _dns_client_add_pending_servers(void)
_dns_client_server_pending_get(pending);
if (dns_server_query(pending->host, DNS_T_AAAA, 0, _dns_client_pending_server_resolve, pending) != 0) {
_dns_client_server_pending_release(pending);
pending->query_v4 = 0;
pending->query_v6 = 0;
}
}

Expand Down Expand Up @@ -4066,7 +4066,7 @@ static void _dns_client_add_pending_servers(void)
continue;
}

if (pending->has_soa && dnsserver_ip == NULL) {
if (pending->has_soa && dnsserver_ip == NULL && pending->query_v4 && pending->query_v6) {
tlog(TLOG_WARN, "add pending DNS server %s failed, no such host.", pending->host);
_dns_client_server_pending_remove(pending);
continue;
Expand Down

0 comments on commit 2576fdb

Please sign in to comment.