Discussion:
buggy getaddrinfo()
Michael Richardson
2014-09-08 15:49:42 UTC
Permalink
Since a long time ago, we test to see if the getaddrinfo() function
is buggy. It appears that if we are cross-compiling, that we always
forceably fail the test.

But, since 2014-0-25, we don't even include getaddrinfo.c, is that because
we never need it anymore, (grep seems to agree), or because???

If we don't need it, can we remove the test in configure for it?
--
] Never tell me the odds! | ipv6 mesh networks [
] Michael Richardson, Sandelman Software Works | network architect [
] ***@sandelman.ca http://www.sandelman.ca/ | ruby on rails [
Guy Harris
2014-09-08 19:10:17 UTC
Permalink
Post by Michael Richardson
Since a long time ago, we test to see if the getaddrinfo() function
is buggy. It appears that if we are cross-compiling, that we always
forceably fail the test.
But, since 2014-0-25, we don't even include getaddrinfo.c, is that because
we never need it anymore, (grep seems to agree), or because???
As far as I can tell from grepping through the CVS files on bpf.tcpdump.org, we *never* needed it in tcpdump.

My guess is that, as part of IPv6 support, the same, or very similar, configure-script changes and replacement getaddrinfo.c/getnameinfo.c were done for both libpcap and tcpdump, even though libpcap only uses getaddrinfo() (e.g., to map host names in filter expressions to addresses) and tcpdump only uses getnameinfo() (to map addresses in packets to host names).
Post by Michael Richardson
If we don't need it, can we remove the test in configure for it?
Unless I've missed something, yes, we can.

Loading...