提交 784b5030 编写于 作者: D Daniel Veillard

Repair getIPv4Addr after the ntohl conversion

* src/util/network.c: getIPv4Addr() got broken when the input
  network address value got converted from network to host byte order
上级 cd04abcc
......@@ -33,7 +33,7 @@ static int getIPv4Addr(virSocketAddrPtr addr, virIPv4AddrPtr tab) {
val = ntohl(addr->inet4.sin_addr.s_addr);
for (i = 0;i < 4;i++) {
(*tab)[i] = val & 0xFF;
(*tab)[3 - i] = val & 0xFF;
val >>= 8;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册