aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIngo Bauersachs <ingo@jitsi.org>2017-01-07 12:50:34 +0100
committerIngo Bauersachs <ingo@jitsi.org>2017-01-07 12:50:34 +0100
commit6830162ae244f90c07bc43fb440039680641bbb9 (patch)
tree79114bd84d376c8375e0b15cb3f98a1ffa7b545f /src
parent6296c62a54d81e14182bacc507361d7e07e89d69 (diff)
downloadjitsi-6830162ae244f90c07bc43fb440039680641bbb9.zip
jitsi-6830162ae244f90c07bc43fb440039680641bbb9.tar.gz
jitsi-6830162ae244f90c07bc43fb440039680641bbb9.tar.bz2
Handle RFC2732 IPv6 addresses ([::1] or [::1%1])
Diffstat (limited to 'src')
-rw-r--r--src/net/java/sip/communicator/util/NetworkUtils.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/net/java/sip/communicator/util/NetworkUtils.java b/src/net/java/sip/communicator/util/NetworkUtils.java
index 427f176..310b8b1 100644
--- a/src/net/java/sip/communicator/util/NetworkUtils.java
+++ b/src/net/java/sip/communicator/util/NetworkUtils.java
@@ -420,6 +420,15 @@ public class NetworkUtils
colonIndex = -1;
int i = 0, j = 0;
+
+ // Can be wrapped in []
+ if (addrBuff[i] == '[')
+ {
+ ++i;
+ if (scopeID == -1)
+ --srcb_length;
+ }
+
// Starting : mean we need to have at least one more.
if (addrBuff[i] == ':')
if (addrBuff[++i] != ':')