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)) {
|
||||
return 0;
|
||||
} else if (has_consecutive_chars(&str[i], SEP, 2)) {
|
||||
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])) {
|
||||
|
|
|
@ -36,6 +36,7 @@ const char *valid[] = {
|
|||
"FF01::101",
|
||||
"::ffff:192.168.2.1",
|
||||
"::FFFF:192.168.2.1",
|
||||
"::13.1.68.3",
|
||||
"::",
|
||||
"::1",
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue