jitsi / ice4j

A Java implementation of the ICE protocol
Apache License 2.0
437 stars 232 forks source link

Contradicting candidate preferences #264

Open Geosearchef opened 2 years ago

Geosearchef commented 2 years ago

According to the comment at https://github.com/jitsi/ice4j/blob/28a23e1859b4f7383cb014642a683c5fb482bf36/src/main/java/org/ice4j/ice/Candidate.java#L558

, IPv6 is preferred to IPv4, this is indicated using preference values 30,40 > 10.

But the comment says, that link local is preferred to global. This is reflected by the value for link local, 30, being larger than the value for global, 40.

Shouldn't these two values be the other way round?

jsklein commented 1 year ago

what version of JAVA are you running? Java SE 17 and beyond fixes the IPv6 issues. Java SE 7 or prior version failed IPv6 in many situations.