Handle RFC2732 IPv6 addresses ([::1] or [::1%1])

This commit is contained in:
Ingo Bauersachs 2017-01-07 13:31:04 +01:00
parent 43e6e5359d
commit 383002efe2

View File

@ -399,6 +399,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] != ':')