diff options
author | Ingo Bauersachs <ingo@jitsi.org> | 2016-12-27 22:35:30 +0100 |
---|---|---|
committer | Ingo Bauersachs <ingo@jitsi.org> | 2016-12-27 22:35:30 +0100 |
commit | 1c6d035dc8c58403156826bbe12f442605baa5b0 (patch) | |
tree | 58b1f73af0024c8dae942b80561840ad789ead95 | |
parent | c7bc11749b35e5d0b7ecf1488080f53d5b8d3ea2 (diff) | |
download | jitsi-1c6d035dc8c58403156826bbe12f442605baa5b0.zip jitsi-1c6d035dc8c58403156826bbe12f442605baa5b0.tar.gz jitsi-1c6d035dc8c58403156826bbe12f442605baa5b0.tar.bz2 |
Strip scope/interface identifier from IPv6 Jingle Nodes relay addresses
-rw-r--r-- | src/net/java/sip/communicator/impl/protocol/jabber/JingleNodesHarvester.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/JingleNodesHarvester.java b/src/net/java/sip/communicator/impl/protocol/jabber/JingleNodesHarvester.java index 5c12aa7..32ee849 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/JingleNodesHarvester.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/JingleNodesHarvester.java @@ -142,6 +142,16 @@ public class JingleNodesHarvester return candidates; } + // Drop the scope or interface name if the relay sends it + // along in its IPv6 address. The scope/ifname is only valid on the + // host that owns the IP and we don't need it here. + int scopeIndex = ip.indexOf('%'); + if (scopeIndex > 0) + { + logger.warn("Dropping scope from assumed IPv6 address " + ip); + ip = ip.substring(0, scopeIndex); + } + /* RTP */ TransportAddress relayedAddress = new TransportAddress(ip, port, Transport.UDP); |