From: Guus Sliepen Date: Thu, 6 Feb 2020 20:34:43 +0000 (+0100) Subject: Use bind() to check if a local address is still valid. X-Git-Url: http://git.meshlink.io/?a=commitdiff_plain;h=4bd83124d50260738991f59a6afe23a31cb672ab;hp=4bd83124d50260738991f59a6afe23a31cb672ab;p=meshlink Use bind() to check if a local address is still valid. Some platforms don't support getifaddrs(). We use this to check if the local address of a socket is still available on any network interface. Instead, try to bind() a new socket to the same address (but port 0) as existing sockets. If it returns EADDRNOTAVAIL, we know that this address is no longer valid. ---