dns_server: set max ip count to 10

This commit is contained in:
Nick Peng
2022-05-15 22:13:12 +08:00
parent e64007f558
commit 9dffec3fd3
2 changed files with 2 additions and 2 deletions

View File

@@ -96,7 +96,7 @@ cache-size 4096
# edns client subnet
# edns-client-subnet [ip/subnet]
# edns-client-subnet 192.168.1.1/24
# edns-client-subnet [8::8]/56
# edns-client-subnet 8::8/56
# ttl for all resource record
# rr-ttl: ttl for all record

View File

@@ -544,7 +544,7 @@ static int _dns_rrs_add_all_best_ip(struct dns_server_post_context *context)
added_ipv6_addr = _dns_ip_address_get(request, request->ipv6_addr, DNS_T_AAAA);
}
while (true) {
while (true && context->ip_num < 10) {
pthread_mutex_lock(&request->ip_map_lock);
hash_for_each_safe(request->ip_map, bucket, tmp, addr_map, node)
{