IPv6 Phase 3: DNS resolver with AAAA and ip6.arpa support
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)
commit6aac55edaf4abac336008b8cda4f02b045b3a307
treebb16635c12ceb8446c8efec9ece2bd7c49a046cf
parent8f4320e76f54703cd68a5812a275850c71775ebf
IPv6 Phase 3: DNS resolver with AAAA and ip6.arpa support

Update the custom DNS resolver to handle IPv6 addresses:

- Change struct hent.h_addr_list from struct in_addr[] to struct irc_addr[]
- Change ResRQ.addr from struct in_addr to struct irc_addr
- Add T_AAAA record handling in proc_answer()
- Support ip6.arpa nibble-format reverse queries for IPv6 PTR lookups
- Update gethost_byaddr() to take struct irc_addr* instead of char*
- Update cache code (find_cache_number, make_cache, update_list) to use
  h_length for address size instead of hardcoded sizeof(struct in_addr)
- Add irc_addr_from_v6(), irc_addr_from_hostent(), irc_addr_raw() helpers
- Replace inetntoa_v4 bridge with cache_addr_str for cached hostent display
- Update all DNS callback sites to use irc_addr_from_hostent()

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
include/h.h
include/irc_addr.h
include/res.h
src/res.c
src/s_bsd.c
src/s_conf.c
src/s_ping.c