[PATCH] Fix "IPv6" connection code and merge it with general code
Adam Majer <[email protected]> Mon, 21 Mar 2005 17:03:10 -0600
| Newsgroups | gmane.comp.multimedia.xmms.devel |
|---|---|
| Organization | Galactica Software Corporation |
| Message-ID | <[email protected]> |
Hi, Most of the current "IPv6" code is actually general connection code not specific to IPv6 or IPv4. One task of the attached patch is to merge the connection code and remove IPv4 specific bits. A functional problem with the current "IPv6" connection code is that it does not wait for a connection to actually succeed or fail before exiting the iteration. Consider that a given host has the following addresses, host my.test.domain 192.168.10.10 20.20.20.20 ::1 The current implementation will open a connection to 192.168.10.10, and exit address iteration, since the socket is asynchronous. It then waits for connection to complete. But if there is nothing listening on that address, the connection will fail. 20.20.20.20 or ::1 are NEVER tried. The patch moves the code that waits for the connection to be established into the loop. Thus if connection for 192.168.10.10 fails, xmms will now try to connect to the next IP address until the list is exhausted. This patch is critical for hosts that have both IPv6 and IPv4 addresses, but the server is only listening on one address (eg. IPv4 only). This is also debian bug 211842 (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=211842) - Adam PS. If someone doesn't want to remove IPv4 specific code, then you can use the patch attached to the above bug report. It doesn't affect legacy code. _______________________________________________ xmms-devel mailing list [email protected] http://lists.xmms.org/mailman/listinfo/xmms-devel
signature.asc
(application/pgp-signature, 256 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCP1Kx73/bNdaAYUURAkwnAJ9jb48z20PBcDwE2OXZNNAv2ueLlgCg4BR9 uK9iJ34dkVUMiIfUxEKvrMo= =cPx4 -----END PGP SIGNATURE-----