dns_server: fix only cache on ip address result issue
This commit is contained in:
@@ -2093,6 +2093,15 @@ static int _dns_conf_load_post(void)
|
||||
dns_conf_response_mode_enum[dns_conf_response_mode].name);
|
||||
}
|
||||
|
||||
|
||||
if ((dns_conf_rr_ttl_min > dns_conf_rr_ttl_max) && dns_conf_rr_ttl_max > 0) {
|
||||
dns_conf_rr_ttl_min = dns_conf_rr_ttl_max;
|
||||
}
|
||||
|
||||
if ((dns_conf_rr_ttl_max < dns_conf_rr_ttl_min) && dns_conf_rr_ttl_max > 0) {
|
||||
dns_conf_rr_ttl_max = dns_conf_rr_ttl_min;
|
||||
}
|
||||
|
||||
if (dns_conf_local_ttl == 0) {
|
||||
dns_conf_local_ttl = dns_conf_rr_ttl_min;
|
||||
}
|
||||
|
||||
@@ -1824,6 +1824,10 @@ static void _dns_server_complete_with_multi_ipaddress(struct dns_request *reques
|
||||
_dns_server_force_dualstack(request);
|
||||
}
|
||||
|
||||
if (request->passthrough && do_reply == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
_dns_server_post_context_init(&context, request);
|
||||
context.do_cache = 1;
|
||||
context.do_ipset = 1;
|
||||
|
||||
Reference in New Issue
Block a user