Correcting endianness handling on ip address