Permalink
Browse files

Do not limit org.ice4j.ice.harvest.DISABLE_LINK_LOCAL_ADDRESSES to IP…

…v6. (#156)

* Do not limit DISABLE_LINK_LOCAL_ADDRESSES to IPv6.

* Removed part about IPv6 for in comment for DISABLE_LINK_LOCAL_ADDRESSES.
  • Loading branch information...
mstyura authored and bgrozev committed Jan 11, 2019
1 parent 4027cf4 commit ce42c77b827a36dd056267aac75fbcbb5e93b556
@@ -220,7 +220,7 @@
= "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
@@ -286,7 +286,7 @@ protected void addLocalAddresses(List<TransportAddress> transportAddresses)
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 @@ protected void addLocalAddresses(List<TransportAddress> transportAddresses)
if (!useIPv6 && (address instanceof Inet6Address))
continue;

if (!useIPv6LinkLocal
&& (address instanceof Inet6Address)
if (!useLinkLocalAddresses
&& address.isLinkLocalAddress())
{
logger.info("Not using link-local address " + address +" for"
@@ -232,7 +232,7 @@ private static synchronized void initializeAddressFilters()
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 @@ private static synchronized void initializeAddressFilters()

if (isIPv6Disabled && address instanceof Inet6Address)
continue;
if (isIPv6LinkLocalDisabled
&& address instanceof Inet6Address
if (isLinkLocalAddressesDisabled
&& address.isLinkLocalAddress())
continue;

@@ -316,7 +315,7 @@ public void harvest(Component component,
StackProperties.DISABLE_IPv6,
false);

boolean isIPv6LinkLocalDisabled = StackProperties.getBoolean(
boolean isLinkLocalAddressesDisabled = StackProperties.getBoolean(
StackProperties.DISABLE_LINK_LOCAL_ADDRESSES,
false);

@@ -353,8 +352,7 @@ public void harvest(Component component,
continue;
}

if (isIPv6LinkLocalDisabled
&& (addr instanceof Inet6Address)
if (isLinkLocalAddressesDisabled
&& addr.isLinkLocalAddress())
{
continue;

0 comments on commit ce42c77

Please sign in to comment.