Add support for ::13.1.68.3

Fix #9
This commit is contained in:
0x1eef 2023-09-22 14:04:52 -03:00
parent c45da5abbc
commit 5748ece401
2 changed files with 7 additions and 2 deletions

View file

@ -27,8 +27,12 @@ isinetaddr6(const char *str)
if (has_consecutive_chars(&str[i], SEP, 3)) {
return 0;
} else if (has_consecutive_chars(&str[i], SEP, 2)) {
char new_str[MAX_STRLEN];
return isinetaddr6(expand(str, len, new_str, i));
if (i == 0 && isinetaddr4(&str[3])) {
return 1;
} else {
char new_str[MAX_STRLEN];
return isinetaddr6(expand(str, len, new_str, i));
}
} else if (str[i] == SEP) {
digitlen = 0;
} else if (isxdigit(str[i])) {

View file

@ -36,6 +36,7 @@ const char *valid[] = {
"FF01::101",
"::ffff:192.168.2.1",
"::FFFF:192.168.2.1",
"::13.1.68.3",
"::",
"::1",
};