mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-11 00:24:12 +02:00
* Removed spurious extra space.
This commit is contained in:
@@ -153,7 +153,7 @@ Servent::startListening( QHostAddress ha, bool upnp, int port, Tomahawk::Network
|
|||||||
continue; // IPv4 localhost as IPv6 address
|
continue; // IPv4 localhost as IPv6 address
|
||||||
if ( addr.isInSubnet( QHostAddress::parseSubnet( "fe80::/10" ) ) )
|
if ( addr.isInSubnet( QHostAddress::parseSubnet( "fe80::/10" ) ) )
|
||||||
continue; // Skip link local addresses
|
continue; // Skip link local addresses
|
||||||
tLog( LOGVERBOSE ) << Q_FUNC_INFO << "Listening to " << addr.toString();
|
tLog( LOGVERBOSE ) << Q_FUNC_INFO << "Listening to" << addr.toString();
|
||||||
d->externalAddresses.append( addr );
|
d->externalAddresses.append( addr );
|
||||||
d->externalListenAll = true;
|
d->externalListenAll = true;
|
||||||
}
|
}
|
||||||
@@ -265,46 +265,46 @@ Servent::isValidExternalIP( const QHostAddress& addr )
|
|||||||
if (addr.protocol() == QAbstractSocket::IPv4Protocol)
|
if (addr.protocol() == QAbstractSocket::IPv4Protocol)
|
||||||
{
|
{
|
||||||
// private network
|
// private network
|
||||||
if ( addr.isInSubnet(QHostAddress::parseSubnet("10.0.0.0/8")) )
|
if ( addr.isInSubnet(QHostAddress::parseSubnet( "10.0.0.0/8" ) ) )
|
||||||
return false;
|
return false;
|
||||||
// localhost
|
// localhost
|
||||||
if ( addr.isInSubnet(QHostAddress::parseSubnet("127.0.0.0/8")) )
|
if ( addr.isInSubnet(QHostAddress::parseSubnet( "127.0.0.0/8" ) ) )
|
||||||
return false;
|
return false;
|
||||||
// private network
|
// private network
|
||||||
if ( addr.isInSubnet(QHostAddress::parseSubnet("169.254.0.0/16")) )
|
if ( addr.isInSubnet(QHostAddress::parseSubnet( "169.254.0.0/16" ) ) )
|
||||||
return false;
|
return false;
|
||||||
// private network
|
// private network
|
||||||
if ( addr.isInSubnet(QHostAddress::parseSubnet("172.16.0.0/12")) )
|
if ( addr.isInSubnet(QHostAddress::parseSubnet( "172.16.0.0/12" ) ) )
|
||||||
return false;
|
return false;
|
||||||
// private network
|
// private network
|
||||||
if ( addr.isInSubnet(QHostAddress::parseSubnet("192.168.0.0/16")) )
|
if ( addr.isInSubnet(QHostAddress::parseSubnet( "192.168.0.0/16" ) ) )
|
||||||
return false;
|
return false;
|
||||||
// multicast
|
// multicast
|
||||||
if ( addr.isInSubnet(QHostAddress::parseSubnet("224.0.0.0/4")) )
|
if ( addr.isInSubnet(QHostAddress::parseSubnet( "224.0.0.0/4" ) ) )
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if (addr.protocol() == QAbstractSocket::IPv4Protocol)
|
else if (addr.protocol() == QAbstractSocket::IPv4Protocol)
|
||||||
{
|
{
|
||||||
// "unspecified address"
|
// "unspecified address"
|
||||||
if ( addr.isInSubnet(QHostAddress::parseSubnet("::/128")) )
|
if ( addr.isInSubnet(QHostAddress::parseSubnet( "::/128" ) ) )
|
||||||
return false;
|
return false;
|
||||||
// link-local
|
// link-local
|
||||||
if ( addr.isInSubnet(QHostAddress::parseSubnet("fe80::/10")) )
|
if ( addr.isInSubnet(QHostAddress::parseSubnet( "fe80::/10" ) ) )
|
||||||
return false;
|
return false;
|
||||||
// unique local addresses
|
// unique local addresses
|
||||||
if ( addr.isInSubnet(QHostAddress::parseSubnet("fc00::/7")) )
|
if ( addr.isInSubnet(QHostAddress::parseSubnet( "fc00::/7" ) ) )
|
||||||
return false;
|
return false;
|
||||||
// benchmarking only
|
// benchmarking only
|
||||||
if ( addr.isInSubnet(QHostAddress::parseSubnet("2001:2::/48")) )
|
if ( addr.isInSubnet(QHostAddress::parseSubnet( "2001:2::/48" ) ) )
|
||||||
return false;
|
return false;
|
||||||
// non-routed IPv6 addresses used for Cryptographic Hash Identifiers
|
// non-routed IPv6 addresses used for Cryptographic Hash Identifiers
|
||||||
if ( addr.isInSubnet(QHostAddress::parseSubnet("2001:10::/28")) )
|
if ( addr.isInSubnet(QHostAddress::parseSubnet( "2001:10::/28" ) ) )
|
||||||
return false;
|
return false;
|
||||||
// documentation prefix
|
// documentation prefix
|
||||||
if ( addr.isInSubnet(QHostAddress::parseSubnet("2001:db8::/32")) )
|
if ( addr.isInSubnet(QHostAddress::parseSubnet( "2001:db8::/32" ) ) )
|
||||||
return false;
|
return false;
|
||||||
// multicast
|
// multicast
|
||||||
if ( addr.isInSubnet(QHostAddress::parseSubnet("ff00::0/8 ")) )
|
if ( addr.isInSubnet(QHostAddress::parseSubnet( "ff00::0/8" ) ) )
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user