]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
01_convert-v6-mapped-v4-addresses.diff
authorGerrit Renker <grenker@cscs.ch>
Thu, 25 Feb 2010 16:05:44 +0000 (17:05 +0100)
committerAndre Noll <maan@systemlinux.org>
Thu, 25 Feb 2010 16:05:44 +0000 (17:05 +0100)
This updates the resolution of v4/v6 addresses to present v6-mapped-v4
addresses in dot-quad format rather than as subtype of v6 address.

The getnameinfo(3) is in use for both address classes, where potential
DNS lookups (requiring Internet connectivity) are avoided by using the
NI_NUMERICHOST flag.
The use of this flag reduces getnameinfo() to inet_ntop(3). In the 'Bugs'
section of the inet_ntop() manpage it is stated that v6-mapped-v4 addresses
are converted into an IPv6 format, which is what had been observed here.

The patch works around the issue by casting the v6-mapped-v4 address into
a genuine AF_INET IPv4 socket address.


No differences found