sopt_ednum='$1' is not a valid option number
sopt_edtype='$1' is not a valid option type
sopt_ecval=Missing value for custom option '$1'
+sopt_ecip=Value for custom option '$1' must be an IP address
sshared_faildel=Failed to delete shared network
sshared_failsave=Failed to save shared network
local $o = $optdef{$in{"cname_$i"}};
local $cv = $in{"cval_$i"};
$cv =~ /\S/ || &error(&text('sopt_ecval', $in{"cname_$i"}));
+ if ($o && $o->{'values'}->[4] eq 'ip-address') {
+ &check_ipaddress($cv) ||
+ &check_ip6address($cv) ||
+ &error(&text('sopt_ecip', $in{"cname_$i"}));
+ }
if ($o && $o->{'values'}->[4] eq 'string' ||
$cv !~ /^([0-9a-fA-F]{1,2}:)*[0-9a-fA-F]{1,2}$/ &&
!&check_ipaddress($cv)) {