mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
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
This commit is contained in:
parent
cd04abcc8e
commit
784b5030c1
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user