Allow hostnames to be entered as well as IPs

This commit is contained in:
Jamie Cameron
2017-03-12 15:36:15 -07:00
parent 0ba71128f1
commit 95b846c6e5
2 changed files with 2 additions and 2 deletions

View File

@ -18,7 +18,7 @@ print &ui_hidden("new", $in{'new'}),"\n";
print &ui_hidden("idx", $in{'idx'}),"\n";
print &ui_table_start($text{'ipkey_header'}, undef, 2);
print &ui_table_row($text{'ipkey_ips'},
print &ui_table_row($text{'ipkey_ips2'},
&ui_textarea("ips", join("\n", @{$ipkey->{'ips'}}),
3, 20));

View File

@ -22,7 +22,7 @@ else {
@ips = split(/\s+/, $in{'ips'});
foreach $i (@ips) {
&check_ipaddress($i) || &check_ip6address($i) ||
&error(&text('ipkey_eip', $i));
&to_ipaddress($i) || &error(&text('ipkey_eip2', $i));
}
@ips || &error(&text('ipkey_eips'));
$ipkey->{'ips'} = \@ips;