Fixes the address filtering for single-port UDP.
This commit is contained in:
parent
1f4aeebe38
commit
8d96b29382
@ -77,10 +77,12 @@ public class SinglePortUdpHarvester
|
||||
= new LinkedList<SinglePortUdpHarvester>();
|
||||
|
||||
List<TransportAddress> addresses = new LinkedList<TransportAddress>();
|
||||
|
||||
boolean isIPv6Disabled = StackProperties.getBoolean(
|
||||
StackProperties.DISABLE_IPv6,
|
||||
false);
|
||||
boolean isIPv6LinkLocalDisabled = StackProperties.getBoolean(
|
||||
StackProperties.DISABLE_LINK_LOCAL_ADDRESSES,
|
||||
false);
|
||||
|
||||
try
|
||||
{
|
||||
@ -100,8 +102,15 @@ public class SinglePortUdpHarvester
|
||||
{
|
||||
InetAddress address = ifaceAddresses.nextElement();
|
||||
|
||||
if (!HostCandidateHarvester.isAddressAllowed(address))
|
||||
continue;
|
||||
|
||||
if (isIPv6Disabled && address instanceof Inet6Address)
|
||||
continue;
|
||||
if (isIPv6LinkLocalDisabled
|
||||
&& address instanceof Inet6Address
|
||||
&& address.isLinkLocalAddress())
|
||||
continue;
|
||||
|
||||
addresses.add(
|
||||
new TransportAddress(address, port, Transport.UDP));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user