libirs: handle scoped IPv6 addresses in /etc/resolv.conf
Commonly used network configuration tools write scoped IPv6 nameserver addresses to /etc/resolv.conf. libirs only handles these when it is compiled with -DIRS_HAVE_SIN6_SCOPE_ID, which is not the default, and only handles numeric scopes, which is not what network configuration tools typically use. This causes dig to be practically unable to handle scoped IPv6 nameserver addresses in /etc/resolv.conf. Fix the problem by: - not requiring a custom compile-time flag to be set in order for scoped IPv6 addresses to be processed by getaddrinfo(), - parsing non-numeric scope identifiers using if_nametoindex(), - setting the sin6_scope_id field in struct sockaddr_in6 structures returned by getaddrinfo() even if the AI_CANONNAME flag is not set.
Showing with 63 additions and 27 deletions