Skip to content

Commit

Permalink
Handle RFC2732 IPv6 addresses ([::1] or [::1%1])
Browse files Browse the repository at this point in the history
  • Loading branch information
ibauersachs committed Jan 7, 2017
1 parent 43e6e53 commit 383002e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main/java/org/ice4j/ice/NetworkUtils.java
Expand Up @@ -399,6 +399,15 @@ public static byte[] strToIPv6(String ipv6AddrStr)

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] != ':')
Expand Down

0 comments on commit 383002e

Please sign in to comment.