Description: client_connect() and client_connect_tls() use inet_pton(AF_INET, host, ...). This only accepts IPv4 dotted-quad addresses. Hostnames and IPv6 literals cause an immediate connection failure with Could not convert host address!.
Suggested fix:
Replace inet_pton(AF_INET, ...) with getaddrinfo(). Use AI_NUMERICHOST only when a numeric address is required, otherwise allow DNS resolution. Update Client/Server structs to use struct sockaddr_storage for IPv6 support (see also IPv6 feature issue).
Labels: bug, quality
**Severity:** low
**Category:** bug
**Location:** `src/shared/transport_tcp.c:134-148`, `src/shared/transport_tls.c:134-140`
**Description:**
`client_connect()` and `client_connect_tls()` use `inet_pton(AF_INET, host, ...)`. This only accepts IPv4 dotted-quad addresses. Hostnames and IPv6 literals cause an immediate connection failure with `Could not convert host address!`.
**Suggested fix:**
Replace `inet_pton(AF_INET, ...)` with `getaddrinfo()`. Use `AI_NUMERICHOST` only when a numeric address is required, otherwise allow DNS resolution. Update `Client`/`Server` structs to use `struct sockaddr_storage` for IPv6 support (see also IPv6 feature issue).
**Labels:** bug, quality
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Severity: low
Category: bug
Location:
src/shared/transport_tcp.c:134-148,src/shared/transport_tls.c:134-140Description:
client_connect()andclient_connect_tls()useinet_pton(AF_INET, host, ...). This only accepts IPv4 dotted-quad addresses. Hostnames and IPv6 literals cause an immediate connection failure withCould not convert host address!.Suggested fix:
Replace
inet_pton(AF_INET, ...)withgetaddrinfo(). UseAI_NUMERICHOSTonly when a numeric address is required, otherwise allow DNS resolution. UpdateClient/Serverstructs to usestruct sockaddr_storagefor IPv6 support (see also IPv6 feature issue).Labels: bug, quality