Skip to content

Non-timeout dual-stack connections fail for IPv4-only servers due to missing fallback #457

@Erlonealpha

Description

@Erlonealpha

The following lines will directly return timeout in Non-timeout without attempting additional addresses:

if (err == NULL || timeout_iszero(tm)) {

According to RFC 8305, the current getaddrinfo function will return both AF_INET6 and AF_INET addresses when dual-stack is enabled.

Issue: When a dual-stack client attempts to connect in Non-timeout mode to a server listening only on an IPv4 address, the connection becomes unreachable.

Recommendation: Add more options to control address selection during connect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions