View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0022605||FPC||RTL||public||2012-08-08 15:18||2012-08-08 21:51|
|Reporter||Mark Morgan Lloyd||Assigned To|
|Product Version||2.7.1||Product Build|
|Target Version||Fixed in Version|
|Summary||0022605: HostAddrToStr6() returns result wrong way round|
|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:22.214.171.124, could this be added as an option to NetAddrToStr6()?
|Tags||No tags attached.|
|Fixed in Revision|
testSockAddrConv.zip (547 bytes)
Regarding the text representation of IPv4 addresses in IPv6 notation see http://tools.ietf.org/html/rfc4291 paragraph 2.2.3
http://tools.ietf.org/html/rfc5952 paragraph 5 actually recommends the mixed notation.
Thanks for those Ludo. The comment on representation of port numbers in the second reference is particularly apposite.
I realised shortly after posting that my comment on big-endian (SPARC) systems doesn't make sense under the circumstances.