Do not limit org.ice4j.ice.harvest.DISABLE_LINK_LOCAL_ADDRESSES to IPv6. (#156)

* Do not limit DISABLE_LINK_LOCAL_ADDRESSES to IPv6.

* Removed part about IPv6 for in comment for DISABLE_LINK_LOCAL_ADDRESSES.
This commit is contained in:
Yury Yaroshevich 2019-01-11 06:50:44 +03:00 committed by bgrozev
parent 4027cf429d
commit ce42c77b82
3 changed files with 7 additions and 10 deletions

View File

@ -220,7 +220,7 @@ public class StackProperties
= "org.ice4j.ice.harvest.ALLOWED_ADDRESSES";
/**
* The name of the property which, if set to true, specifies that IPv6
* The name of the property which, if set to true, specifies that
* link local addresses should not be used for candidate allocations.
*/
public static final String DISABLE_LINK_LOCAL_ADDRESSES

View File

@ -286,7 +286,7 @@ public abstract class AbstractTcpListener
boolean useIPv6 = !StackProperties.getBoolean(
StackProperties.DISABLE_IPv6,
false);
boolean useIPv6LinkLocal = !StackProperties.getBoolean(
boolean useLinkLocalAddresses = !StackProperties.getBoolean(
StackProperties.DISABLE_LINK_LOCAL_ADDRESSES,
false);
@ -335,8 +335,7 @@ public abstract class AbstractTcpListener
if (!useIPv6 && (address instanceof Inet6Address))
continue;
if (!useIPv6LinkLocal
&& (address instanceof Inet6Address)
if (!useLinkLocalAddresses
&& address.isLinkLocalAddress())
{
logger.info("Not using link-local address " + address +" for"

View File

@ -232,7 +232,7 @@ public class HostCandidateHarvester
boolean isIPv6Disabled = StackProperties.getBoolean(
StackProperties.DISABLE_IPv6,
false);
boolean isIPv6LinkLocalDisabled = StackProperties.getBoolean(
boolean isLinkLocalAddressesDisabled = StackProperties.getBoolean(
StackProperties.DISABLE_LINK_LOCAL_ADDRESSES,
false);
@ -259,8 +259,7 @@ public class HostCandidateHarvester
if (isIPv6Disabled && address instanceof Inet6Address)
continue;
if (isIPv6LinkLocalDisabled
&& address instanceof Inet6Address
if (isLinkLocalAddressesDisabled
&& address.isLinkLocalAddress())
continue;
@ -316,7 +315,7 @@ public class HostCandidateHarvester
StackProperties.DISABLE_IPv6,
false);
boolean isIPv6LinkLocalDisabled = StackProperties.getBoolean(
boolean isLinkLocalAddressesDisabled = StackProperties.getBoolean(
StackProperties.DISABLE_LINK_LOCAL_ADDRESSES,
false);
@ -353,8 +352,7 @@ public class HostCandidateHarvester
continue;
}
if (isIPv6LinkLocalDisabled
&& (addr instanceof Inet6Address)
if (isLinkLocalAddressesDisabled
&& addr.isLinkLocalAddress())
{
continue;