Bug 2182803 - [RFE] Detect IPv4 and IPv6 system connectivity and expose it to /etc/resolv.conf
Summary: [RFE] Detect IPv4 and IPv6 system connectivity and expose it to /etc/resolv.conf
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: NetworkManager
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lubomir Rintel
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 2182745
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-03-29 16:43 UTC by Petr Menšík
Modified: 2023-03-29 16:43 UTC (History)
10 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Petr Menšík 2023-03-29 16:43:47 UTC
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:


Note You need to log in before you can comment on or make changes to this bug.