1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-13 17:43:59 +02:00

Ignore IPv4 localhost even if written as IPv6 address

This commit is contained in:
Uwe L. Korn
2013-04-05 22:03:31 +02:00
committed by Michael Zanetti
parent d3afba1a90
commit 85c7b16fa1

View File

@@ -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 );