ip: handle ipv4-mapped ipv6 addr missing sections properly.
This commit is contained in:
parent
3960275b0c
commit
bcde9d59a7
@ -280,6 +280,14 @@ IP.parseV6 = function parseV6(str, buf, offset) {
|
||||
assert(missing >= 0, 'IPv6 address is too long.');
|
||||
assert(parts.length >= 2, 'Not an IPv6 address.');
|
||||
|
||||
for (i = 0; i < parts.length; i++) {
|
||||
word = parts[i];
|
||||
if (IP.isV4Format(word))
|
||||
missing--;
|
||||
}
|
||||
|
||||
assert(missing >= 0, 'IPv6 address is too long.');
|
||||
|
||||
for (i = 0; i < parts.length; i++) {
|
||||
word = parts[i];
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user