diff --git a/src/cares_wrap.cc b/src/cares_wrap.cc index 2983f9364cb0e3..6d7a8e66a9d2ce 100644 --- a/src/cares_wrap.cc +++ b/src/cares_wrap.cc @@ -2249,7 +2249,7 @@ void SetLocalAddress(const FunctionCallbackInfo& args) { // to 0 (any). if (uv_inet_pton(AF_INET, *ip0, &addr0) == 0) { - ares_set_local_ip4(channel->cares_channel(), cares_get_32bit(addr0)); + ares_set_local_ip4(channel->cares_channel(), ReadUint32BE(addr0)); type0 = 4; } else if (uv_inet_pton(AF_INET6, *ip0, &addr0) == 0) { ares_set_local_ip6(channel->cares_channel(), addr0); @@ -2268,7 +2268,7 @@ void SetLocalAddress(const FunctionCallbackInfo& args) { THROW_ERR_INVALID_ARG_VALUE(env, "Cannot specify two IPv4 addresses."); return; } else { - ares_set_local_ip4(channel->cares_channel(), cares_get_32bit(addr1)); + ares_set_local_ip4(channel->cares_channel(), ReadUint32BE(addr1)); } } else if (uv_inet_pton(AF_INET6, *ip1, &addr1) == 0) { if (type0 == 6) {