]> git.tuebingen.mpg.de Git - paraslash.git/commit
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)
commit93fb236019f67425bd9cf75891d2432e36d02132
treeef40e09e2eb866727e37df9fbd253c694cc206fd
parent50fac71430f5993560d40eb5044d45d8255d7ca6
01_convert-v6-mapped-v4-addresses.diff

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.
net.c