Validate the ip
setting
This commit is contained in:
parent
fe513f733d
commit
ab0a4597ce
1 changed files with 4 additions and 0 deletions
|
@ -2212,6 +2212,10 @@ sub get_ip {
|
||||||
|
|
||||||
if ($use eq 'ip') {
|
if ($use eq 'ip') {
|
||||||
$ip = opt('ip', $h);
|
$ip = opt('ip', $h);
|
||||||
|
if (!is_ipv4($ip) && !is_ipv6($ip)) {
|
||||||
|
warning("'%s' is not a valid IPv4 or IPv6 address", $ip);
|
||||||
|
$ip = undef;
|
||||||
|
}
|
||||||
$arg = 'ip';
|
$arg = 'ip';
|
||||||
|
|
||||||
} elsif ($use eq 'if') {
|
} elsif ($use eq 'if') {
|
||||||
|
|
Loading…
Reference in a new issue