commit
c41c1eda34
2 changed files with 7 additions and 2 deletions
|
@ -27,8 +27,12 @@ isinetaddr6(const char *str)
|
||||||
if (has_consecutive_chars(&str[i], SEP, 3)) {
|
if (has_consecutive_chars(&str[i], SEP, 3)) {
|
||||||
return 0;
|
return 0;
|
||||||
} else if (has_consecutive_chars(&str[i], SEP, 2)) {
|
} else if (has_consecutive_chars(&str[i], SEP, 2)) {
|
||||||
char new_str[MAX_STRLEN];
|
if (i == 0 && isinetaddr4(&str[3])) {
|
||||||
return isinetaddr6(expand(str, len, new_str, i));
|
return 1;
|
||||||
|
} else {
|
||||||
|
char new_str[MAX_STRLEN];
|
||||||
|
return isinetaddr6(expand(str, len, new_str, i));
|
||||||
|
}
|
||||||
} else if (str[i] == SEP) {
|
} else if (str[i] == SEP) {
|
||||||
digitlen = 0;
|
digitlen = 0;
|
||||||
} else if (isxdigit(str[i])) {
|
} else if (isxdigit(str[i])) {
|
||||||
|
|
|
@ -36,6 +36,7 @@ const char *valid[] = {
|
||||||
"FF01::101",
|
"FF01::101",
|
||||||
"::ffff:192.168.2.1",
|
"::ffff:192.168.2.1",
|
||||||
"::FFFF:192.168.2.1",
|
"::FFFF:192.168.2.1",
|
||||||
|
"::13.1.68.3",
|
||||||
"::",
|
"::",
|
||||||
"::1",
|
"::1",
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue