Use is_ipv6
, not extract_ipv6
, to validate IPv6 address
This commit is contained in:
parent
af1332264f
commit
fe513f733d
1 changed files with 1 additions and 3 deletions
|
@ -1930,9 +1930,7 @@ sub check_value {
|
|||
return undef if $value eq "";
|
||||
|
||||
} elsif ($type eq T_IP) {
|
||||
if (!extract_ipv6($value)) {
|
||||
return undef if !is_ipv4($value);
|
||||
}
|
||||
return undef if !is_ipv4($value) && !is_ipv6($value);
|
||||
}
|
||||
return $value;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue