Edgar Fuß
2017-10-24 13:19:29 UTC
I've noticed[*] that on NetBSD, getaddrinfo(3) does a resolver lookup even
if presented a numerical address. Is this on purpose? Would it have a
drawback if it would first try to inet_pton() the address?
On Linux, it seems to avoid the resolver lookup.
* The problem was net/nagios-plugins' check_ping to stall during a resolver
malfunction (despite the addresses given numerically). It turned out that
check_ping, in order to find out whether it needs to call a syntactically
different ping6 command, checks whether the -H argument is IPv6. It does
this eventually by calling getaddrinfo() with an AF_INET6 hint, resulting
in resolver lookups, which failed.
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
if presented a numerical address. Is this on purpose? Would it have a
drawback if it would first try to inet_pton() the address?
On Linux, it seems to avoid the resolver lookup.
* The problem was net/nagios-plugins' check_ping to stall during a resolver
malfunction (despite the addresses given numerically). It turned out that
check_ping, in order to find out whether it needs to call a syntactically
different ping6 command, checks whether the -H argument is IPv6. It does
this eventually by calling getaddrinfo() with an AF_INET6 hint, resulting
in resolver lookups, which failed.
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de