Try to be better about handling the results of getaddrinfo(): when
authorMartin Pool <mbp@samba.org>
Mon, 26 Nov 2001 07:10:06 +0000 (07:10 +0000)
committerMartin Pool <mbp@samba.org>
Mon, 26 Nov 2001 07:10:06 +0000 (07:10 +0000)
commitb8771f9615ecfa8989e8982aac33bb31eeaaec22
treee02a24e8c2ddadad084467293a71242547a36a08
parentd5d4b282203f9cb06e77e67021ffdd62abb24d89
Try to be better about handling the results of getaddrinfo(): when
opening an inbound socket, we might get several address results,
e.g. for the machine's ipv4 and ipv6 name.

If binding a wildcard, then any one of them should do.  If an address
was specified but it's insufficiently specific then that's not our
fault.

However, some of the advertized addresses may not work because e.g. we
don't have IPv6 support in the kernel.  In that case go on and try all
addresses until one succeeds.
socket.c