]> git.tuebingen.mpg.de Git - paraslash.git/commit
[NET]: Bug-fix for getaddrinfo()
authorGerrit Renker <gerrit@erg.abdn.ac.uk>
Wed, 14 May 2008 11:16:33 +0000 (13:16 +0200)
committerAndre Noll <maan@systemlinux.org>
Wed, 14 May 2008 11:16:33 +0000 (13:16 +0200)
commitec22c98399a8317cb8310a343ac0030279b58571
tree0755c6edc31eff7e233c080b711d3d53567abff2
parente9dd157ea38bda80821bd22c34ac49d022a0b3b0
[NET]: Bug-fix for getaddrinfo()

Something changed in the getaddrinfo() mechanism, causing AF_UNSPEC
in combination with ai_socktype=0 to return IPv4 addresses first
(instead of starting with IPv6 addresses). As a consequence, IPv6
servers are restricted to only IPv4 connections - IPv6 clients will
receive an ICMPv6 error message, which gets translated into an annoying
"protocol error" locally.

The fix is to pretend to be UDP instead of DCCP (pretending to be TCP
also works). This allows getaddrinfo to look up the address without
side effects and has been found to work.
net.c