--- src/nss.c +++ src/nss.c @@ -620,7 +620,7 @@ #ifdef MDNS_MINIMAL /* Only query for 169.254.0.0/16 IPv4 in minimal mode */ - if ((af == AF_INET && ((ntohl(*(const uint32_t*) addr) & 0xFFFF0000UL) != 0xA9FE0000UL)) || + if ((af == AF_INET && !(((const uint8_t*) addr)[0] == 169 && (((const uint8_t*) addr)[1] == 254))) || (af == AF_INET6 && !(((const uint8_t*) addr)[0] == 0xFE && (((const uint8_t*) addr)[1] >> 6) == 2))) { *errnop = EINVAL;