Router: Honor IPv6 setting when converting configured hostnames

to IP addresses (proposal #141)
This commit is contained in:
zzz
2017-10-11 16:23:13 +00:00
parent e3751b36ec
commit 37e0b2ceb1

View File

@@ -2073,6 +2073,12 @@ public class UDPTransport extends TransportImpl implements TimedWeightedPriority
// we only take one each of v4 and v6
boolean v4 = false;
boolean v6 = false;
// prevent adding a type if disabled
TransportUtil.IPv6Config cfg = getIPv6Config();
if (cfg == IPV6_DISABLED)
v6 = true;
else if (cfg == IPV6_ONLY)
v4 = true;
for (int i = 0; i < hosts.length; i++) {
String h = hosts[i];
if (h.length() <= 0)