The TCP transport in src/shared/transport_tcp.c hard-codes IPv4 throughout:
Line 21:socket(AF_INET, SOCK_STREAM, 0) — creates IPv4-only sockets Line 37:server->address.sin_addr.s_addr = INADDR_ANY — binds to IPv4 wildcard Line 137:inet_pton(AF_INET, host, &client->address.sin_addr) — only parses IPv4 addresses
This means:
Server cannot listen on IPv6 addresses
Client cannot connect to IPv6 hosts
Dual-stack (IPv4+IPv6) not supported
In IPv6-only environments, the tool is completely non-functional
Suggested Fix: Use getaddrinfo() with AF_UNSPEC for both client and server to support both address families, or provide an --ipv4/--ipv6 option.
Location:src/shared/transport_tcp.c:21,37,137
Severity: medium
The TCP transport in `src/shared/transport_tcp.c` hard-codes IPv4 throughout:
**Line 21:** `socket(AF_INET, SOCK_STREAM, 0)` — creates IPv4-only sockets
**Line 37:** `server->address.sin_addr.s_addr = INADDR_ANY` — binds to IPv4 wildcard
**Line 137:** `inet_pton(AF_INET, host, &client->address.sin_addr)` — only parses IPv4 addresses
This means:
- Server cannot listen on IPv6 addresses
- Client cannot connect to IPv6 hosts
- Dual-stack (IPv4+IPv6) not supported
- In IPv6-only environments, the tool is completely non-functional
**Suggested Fix:** Use `getaddrinfo()` with `AF_UNSPEC` for both client and server to support both address families, or provide an `--ipv4`/`--ipv6` option.
**Location:** `src/shared/transport_tcp.c:21,37,137`
**Severity:** medium
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.
The TCP transport in
src/shared/transport_tcp.chard-codes IPv4 throughout:Line 21:
socket(AF_INET, SOCK_STREAM, 0)— creates IPv4-only socketsLine 37:
server->address.sin_addr.s_addr = INADDR_ANY— binds to IPv4 wildcardLine 137:
inet_pton(AF_INET, host, &client->address.sin_addr)— only parses IPv4 addressesThis means:
Suggested Fix: Use
getaddrinfo()withAF_UNSPECfor both client and server to support both address families, or provide an--ipv4/--ipv6option.Location:
src/shared/transport_tcp.c:21,37,137Severity: medium