From 062e335b386782cacb753387087e1c924d2bc825 Mon Sep 17 00:00:00 2001 From: "lubomir.marinov" Date: Tue, 26 Nov 2013 12:48:37 +0000 Subject: [PATCH] Prevents host candidates with loopback addresses. Patch by Emil Ivov. --- src/org/ice4j/ice/harvest/HostCandidateHarvester.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/org/ice4j/ice/harvest/HostCandidateHarvester.java b/src/org/ice4j/ice/harvest/HostCandidateHarvester.java index 6cbef74..298c0ef 100644 --- a/src/org/ice4j/ice/harvest/HostCandidateHarvester.java +++ b/src/org/ice4j/ice/harvest/HostCandidateHarvester.java @@ -102,6 +102,12 @@ public class HostCandidateHarvester { InetAddress addr = addresses.nextElement(); + if (addr.isLoopbackAddress()) + { + //loopback again + continue; + } + if((addr instanceof Inet4Address) || !isIPv6Disabled) { IceSocketWrapper sock = null;