changeset 30585:03988b6b41dd

Use IPV6_V6ONLY for the bonjour IPv6 socket so that we can register the separate IPv4 socket on the same port. Fixes #12657
author Daniel Atallah <daniel.atallah@gmail.com>
date Mon, 04 Oct 2010 02:36:19 +0000
parents ab8d9cea5a30
children 4855fdb19fb2
files libpurple/protocols/bonjour/jabber.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/bonjour/jabber.c	Mon Oct 04 02:33:28 2010 +0000
+++ b/libpurple/protocols/bonjour/jabber.c	Mon Oct 04 02:36:19 2010 +0000
@@ -774,6 +774,10 @@
 #ifdef PF_INET6
 	if (jdata->socket6 != -1) {
 		struct sockaddr_in6 addr6;
+#ifdef IPV6_V6ONLY
+		int on = 1;
+		setsockopt(jdata->socket6, IPPROTO_IPV6, IPV6_V6ONLY, &on, sizeof(on));
+#endif
 	        memset(&addr6, 0, sizeof(addr6));
 		addr6.sin6_family = AF_INET6;
 		addr6.sin6_port = htons(jdata->port);