summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2015-02-01 15:33:39 (GMT)
committerTobias Markmann <tm@ayena.de>2015-02-02 14:37:41 (GMT)
commitd860805af76ec85e003bf3019407bbb7acd218c9 (patch)
treeb83b63fe025f1e57f1b9bf2b7bc6863c665f3bb6 /Swiften
parent22ad0360bb273c62af4e5a2106f4e87c1b4fa3ac (diff)
downloadswift-d860805af76ec85e003bf3019407bbb7acd218c9.zip
swift-d860805af76ec85e003bf3019407bbb7acd218c9.tar.bz2
Fix IPv6 name resolution on Linux systems
Boost query objects are setup with the flag address_configured by default which only does IPv6 resoltuion if a non-loopback device is found. This detection mechanism does not seem to work. At least in my test VM there was a non-loopback device with IPv6 address and it still reported no IPv6 addresses. Setting the flag to passive will have it always send queries for AAAA records. Test-Informatioon: Tested on Mac OS X 10.9.5 and Elementary OS 0.2.1 (Linux). Change-Id: I346bcb7982dee465aa7847a7bae8981a16f2d3bc
Diffstat (limited to 'Swiften')
-rw-r--r--Swiften/Network/PlatformDomainNameAddressQuery.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Swiften/Network/PlatformDomainNameAddressQuery.cpp b/Swiften/Network/PlatformDomainNameAddressQuery.cpp
index ad7ba2a..99e5eda 100644
--- a/Swiften/Network/PlatformDomainNameAddressQuery.cpp
+++ b/Swiften/Network/PlatformDomainNameAddressQuery.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Isode Limited.
+ * Copyright (c) 2010-2015 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -31,7 +31,7 @@ void PlatformDomainNameAddressQuery::runBlocking() {
}
//std::cout << "PlatformDomainNameResolver::doRun()" << std::endl;
boost::asio::ip::tcp::resolver resolver(ioService);
- boost::asio::ip::tcp::resolver::query query(hostname, "5222");
+ boost::asio::ip::tcp::resolver::query query(hostname, "5222", boost::asio::ip::resolver_query_base::passive);
try {
//std::cout << "PlatformDomainNameResolver::doRun(): Resolving" << std::endl;
boost::asio::ip::tcp::resolver::iterator endpointIterator = resolver.resolve(query);