diff --git a/bind8/find_free.cgi b/bind8/find_free.cgi index 341ac6abc..2e7135c7a 100755 --- a/bind8/find_free.cgi +++ b/bind8/find_free.cgi @@ -44,7 +44,8 @@ if ($in{'from'} && $in{'to'}) { $rhs =~ s/\$\$/\0/g; $rhs =~ s/\$/$i/g; $rhs =~ s/\0/\$/g; - $rhsfull = $rhs =~ /\.$/ ? $rhs : + $rhsfull = &check_ipaddress($rhs) ? $rhs : + $rhs =~ /\.$/ ? $rhs : $dom eq "." ? "$rhs." : "$rhs.$dom"; push(@recs, { 'name' => $lhsfull, 'values' => [ $rhsfull ], diff --git a/bind8/save_gen.cgi b/bind8/save_gen.cgi index 795fbe3cf..67cdcc8c8 100755 --- a/bind8/save_gen.cgi +++ b/bind8/save_gen.cgi @@ -44,7 +44,8 @@ if ($in{'show'}) { $rhs =~ s/\$\$/\0/g; $rhs =~ s/\$/$i/g; $rhs =~ s/\0/\$/g; - $rhsfull = $rhs =~ /\.$/ ? $rhs : + $rhsfull = &check_ipaddress($rhs) ? $rhs : + $rhs =~ /\.$/ ? $rhs : $dom eq "." ? "$rhs." : "$rhs.$dom"; print &ui_columns_row([