From: Nick Mathewson Date: Tue, 18 May 2010 17:55:32 +0000 (-0400) Subject: Correctly recognize .255 addresses as link-local when looking for interfaces X-Git-Tag: release-2.0.6-rc~62 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8c3452bcb294e07888;p=libevent Correctly recognize .255 addresses as link-local when looking for interfaces --- diff --git a/evutil.c b/evutil.c index 639a51a3..f55d7355 100644 --- a/evutil.c +++ b/evutil.c @@ -492,7 +492,7 @@ evutil_check_interfaces(int force_recheck) /* We might have an IPv4 interface. */ ev_uint32_t addr = ntohl(sin_out.sin_addr.s_addr); if (addr == 0 || (addr&0xff000000) == 127 || - (addr && 0xff) == 255 || (addr & 0xf0) == 14) { + (addr & 0xff) == 255 || (addr & 0xf0) == 14) { evutil_inet_ntop(AF_INET, &sin_out.sin_addr, buf, sizeof(buf)); /* This is a reserved, ipv4compat, ipv4map, loopback,