IPv6 Phase 2: Dual-stack socket layer
authorRemco Rijnders <remmy@serenity-irc.net>
Sat, 7 Mar 2026 17:17:36 +0000 (12:17 -0500)
committerRemco Rijnders <remmy@serenity-irc.net>
Sat, 7 Mar 2026 17:17:36 +0000 (12:17 -0500)
commit8f4320e76f54703cd68a5812a275850c71775ebf
tree2323e0fd8863119959a2e9a7cf0535e57cf92ced
parentf488f6e5426dcdd8769468df8ef00909acfce852
IPv6 Phase 2: Dual-stack socket layer

Update inetport() to create AF_INET6 dual-stack listeners (IPV6_V6ONLY=0)
for wildcard and IPv6 bind addresses, accepting both v4 and v6 clients on
a single socket. IPv4-specific bind addresses still use AF_INET.

Switch check_init() and add_connection() from sockaddr_in to
sockaddr_storage so getpeername() works for both address families.

Rewrite connect_inet() to open AF_INET or AF_INET6 sockets based on the
target address family from aconf->ipnum.

Fix gethost_byaddr() call to pass &ip.addr.v4 (not &ip) since the
resolver is still IPv4-only (Phase 3). Remove unused static mysk.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
src/s_bsd.c