1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-12-22 18:48:00 +01:00

Add '::1' to the loopbackAddresses

This commit is contained in:
Florian Schmaus 2014-08-20 18:12:48 +02:00
parent 47ffcd8b6d
commit eeea0e34ca

View file

@ -666,7 +666,7 @@ public final class Socks5BytestreamManager implements BytestreamManager {
List<StreamHost> streamHosts = new ArrayList<StreamHost>(); List<StreamHost> streamHosts = new ArrayList<StreamHost>();
outerloop: for (String address : addresses) { outerloop: for (String address : addresses) {
// Prevent loopback addresses from appearing as streamhost // Prevent loopback addresses from appearing as streamhost
final String[] loopbackAddresses = { "127.0.0.1", "0:0:0:0:0:0:0:1" }; final String[] loopbackAddresses = { "127.0.0.1", "0:0:0:0:0:0:0:1", "::1" };
for (String loopbackAddress : loopbackAddresses) { for (String loopbackAddress : loopbackAddresses) {
// Use 'startsWith' here since IPv6 addresses may have scope ID, // Use 'startsWith' here since IPv6 addresses may have scope ID,
// ie. the part after the '%' sign. // ie. the part after the '%' sign.