Hi, наб wrote,
getaddrinfo() returns addresses from, at least, ip(7) and ipv6(7), but _addr() always uses sin_addr from struct sockaddr_in; we're saved from wild unsoundness (or incompatibility) by virtue of struct sockaddr_in6 having an always-0 u32 sin6_flowinfo at the same offset, so we end up returning 0 anyway, but in a round-about and definitely unintended way
Instead, limit the request to AF_INET, and fall through to the end early, returning the default id=0
Signed-off-by: Ahelenia Ziemiańska nabijaczleweli@nabijaczleweli.xyz
Applied and pushed, thx Waldemar