Validate the ip setting

This commit is contained in:
David Kerr 2020-06-30 13:29:10 -04:00 committed by Richard Hansen
parent fe513f733d
commit ab0a4597ce

View file

@ -2212,6 +2212,10 @@ sub get_ip {
if ($use eq 'ip') {
$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';
} elsif ($use eq 'if') {