mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-19 09:15:34 -04:00
Correctly recognize .255 addresses as link-local when looking for interfaces
This commit is contained in:
parent
bda21e7ff9
commit
8c3452bcb2
2
evutil.c
2
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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user