timesyncd: don't ask for AAAA when IPv6 is disabled
ipv6_is_supported only tells us the kernel has IPv6, not that it's usable. ipv6_is_enabled also checks the sysctl that turns it off, so we stop resolving addresses we can't use.
This commit is contained in:
@@ -1005,7 +1005,7 @@ int manager_connect(Manager *m) {
|
||||
struct addrinfo hints = {
|
||||
.ai_flags = AI_NUMERICSERV|AI_ADDRCONFIG,
|
||||
.ai_socktype = SOCK_DGRAM,
|
||||
.ai_family = socket_ipv6_is_supported() ? AF_UNSPEC : AF_INET,
|
||||
.ai_family = socket_ipv6_is_enabled() ? AF_UNSPEC : AF_INET,
|
||||
};
|
||||
|
||||
r = resolve_getaddrinfo(m->resolve, &m->resolve_query, m->current_server_name->string, "123", &hints, manager_resolve_handler, NULL, m);
|
||||
|
||||
Reference in New Issue
Block a user