Skip to content

Commit

Permalink
Merge pull request #323 from pymumu/master
Browse files Browse the repository at this point in the history
Fork Sync
  • Loading branch information
PikuZheng authored Sep 21, 2024
2 parents a65c090 + 84f217d commit 62e5f34
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/dns_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -4309,7 +4309,7 @@ static int _dns_client_pending_server_resolve(const struct dns_result *result, v
int has_soa = 0;

if (result->rtcode == DNS_RC_NXDOMAIN || result->has_soa == 1 || result->rtcode == DNS_RC_REFUSED ||
(result->rtcode == DNS_RC_NOERROR && result->ip_num == 0)) {
(result->rtcode == DNS_RC_NOERROR && result->ip_num == 0 && result->ip == NULL)) {
has_soa = 1;
}

Expand Down
5 changes: 4 additions & 1 deletion src/dns_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -4411,7 +4411,10 @@ static int _dns_server_get_answer(struct dns_server_post_context *context)
continue;
}

_dns_server_context_add_ip(context, addr_map->ip_addr);
if (addr_map != NULL) {
_dns_server_context_add_ip(context, addr_map->ip_addr);
}

if (request->has_ip == 1) {
continue;
}
Expand Down

0 comments on commit 62e5f34

Please sign in to comment.