mirror of
https://gitlab.com/chrony/chrony.git
synced 2026-01-20 21:00:20 -05:00
Don't retry resolving in DNS_Name2IPAddress
Instead of retrying to resolve it in the function and blocking for a long time, return a TryAgain status and let the caller retry it later if necessary.
This commit is contained in:
4
conf.c
4
conf.c
@@ -754,7 +754,7 @@ parse_initstepslew(const char *line)
|
||||
}
|
||||
while (*p) {
|
||||
if (sscanf(p, "%" SHOSTNAME_LEN "s%n", hostname, &n) == 1) {
|
||||
if (DNS_Name2IPAddress(hostname, &ip_addr, 1)) {
|
||||
if (DNS_Name2IPAddress(hostname, &ip_addr) == DNS_Success) {
|
||||
init_srcs_ip[n_init_srcs] = ip_addr;
|
||||
++n_init_srcs;
|
||||
}
|
||||
@@ -962,7 +962,7 @@ parse_allow_deny(const char *line, AllowDeny *list, int allow)
|
||||
}
|
||||
|
||||
} else {
|
||||
if (DNS_Name2IPAddress(p, &ip_addr, 1)) {
|
||||
if (DNS_Name2IPAddress(p, &ip_addr) == DNS_Success) {
|
||||
new_node = MallocNew(AllowDeny);
|
||||
new_node->allow = allow;
|
||||
new_node->all = all;
|
||||
|
||||
Reference in New Issue
Block a user