From 18eda1d3a83ae9624e0583e01913c6b51dc8d8ff Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Fri, 5 Apr 2013 22:03:31 +0200 Subject: [PATCH] Ignore IPv4 localhost even if written as IPv6 address --- src/libtomahawk/network/Servent.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libtomahawk/network/Servent.cpp b/src/libtomahawk/network/Servent.cpp index c449ec62a..81ff5d2cd 100644 --- a/src/libtomahawk/network/Servent.cpp +++ b/src/libtomahawk/network/Servent.cpp @@ -148,12 +148,14 @@ Servent::startListening( QHostAddress ha, bool upnp, int port ) continue; // IPv4 localhost if ( addr.toString() == "::1" ) continue; // IPv6 localhost + if ( addr.toString() == "::7F00:1" ) + continue; // IPv4 localhost as IPv6 address tLog( LOGVERBOSE ) << Q_FUNC_INFO << "Listening to " << addr.toString(); m_externalAddresses.append( addr ); } } - else if ( ( ha.toString() != "127.0.0.1" ) && ( ha.toString() != "::1" ) ) + else if ( ( ha.toString() != "127.0.0.1" ) && ( ha.toString() != "::1" ) && ( ha.toString() == "::7F00:1" ) ) { // We listen only to one specific Address, only announce this. m_externalAddresses.append( ha );