diff options
-rw-r--r-- | luni/src/main/native/libcore_io_Posix.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/luni/src/main/native/libcore_io_Posix.cpp b/luni/src/main/native/libcore_io_Posix.cpp index 88990a5..f6af483 100644 --- a/luni/src/main/native/libcore_io_Posix.cpp +++ b/luni/src/main/native/libcore_io_Posix.cpp @@ -511,7 +511,7 @@ static bool javaPacketSocketAddressToSockaddr( sockaddr_ll *sll = reinterpret_cast<sockaddr_ll *>(&ss); sll->sll_family = AF_PACKET; - sll->sll_protocol = ntohs(env->GetShortField(javaSocketAddress, protocolFid)); + sll->sll_protocol = htons(env->GetShortField(javaSocketAddress, protocolFid)); sll->sll_ifindex = env->GetIntField(javaSocketAddress, ifindexFid); sll->sll_hatype = env->GetShortField(javaSocketAddress, hatypeFid); sll->sll_pkttype = env->GetByteField(javaSocketAddress, pkttypeFid); |