HostAddrToStr6() returns result wrong way round
Original Reporter info from Mantis: MarkMLl @MarkMLl
-
Reporter name: Mark Morgan Lloyd
Original Reporter info from Mantis: MarkMLl @MarkMLl
- Reporter name: Mark Morgan Lloyd
Description:
Attached program tests IP address conversion from string to binary and back, and from a binary constant to a string. On little-endian (x86) systems, HostAddrToStr6() appears to behave the same as NetAddrToStr6(); on big-endian (SPARC) this appears to also affect the IP4 functions.
Also affects 2.6.0, not tested 2.6.1. Only tested on Linux.
Additional information:
Also, when an IP4 connection is accepted on a combined IP6+4 socket on Linux an IP6 socket is returned with a peer address such as ::ffff:ab:cd:ef:01.
There appears to be a convention in e.g. Linux ping6 that this is rendered as e.g. ::ffff:171.205.239.1, could this be added as an option to NetAddrToStr6()?
Mantis conversion info:
- Mantis ID: 22605
- OS: Linux
- Platform: x86
- Version: 2.7.1