Description of problem: It would be best if the service managing /etc/resolv.conf were exporting indication into it, what types of connectivity are available at the system. It could be used in applications without special configuration in end applications to send just DNS queries, which will be actually useful. Depends on bug #2182745 to add support into glibc. If the connectivity of the system changes, modify /etc/resolv.conf and use options to indicate which families have at least one non-localhost route. It should NOT depend only on default route. Even if I have only one site-only IPv6 route without a default gateway, it already makes sense to start sending AAAA queries as well. Until we have at least one non-local route of the family, just avoid querying such family unless requested explicitly. Version-Release number of selected component (if applicable): NetworkManager-1:1.43.4-1.fc39.x86_64 How reproducible: always Steps to Reproduce: 1. Have only one address family connection, for example IPv4 only. 2. strace curl http://example.org/ 3. Actual results: will show unnecessary failures to connect(). Expected results: It will query only addresses, which can connect in the system state. In IPv4 only network only localhost and link-local addresses may work. Do not query them unless explicitly requested by AF_INET6. Similar for IPv6 only network. Additional info: