diff --git a/htdocs/management/ip.html b/htdocs/management/ip.html index b4db5f383..39ff9ffc7 100644 --- a/htdocs/management/ip.html +++ b/htdocs/management/ip.html @@ -1345,7 +1345,7 @@ my $ip = new NetAddr::IP($o->address, $o->prefix); push( @field_headers, "Netmask:", "Broadcast:" ); -push( @cell_data, $ip->mask); +push( @cell_data, ($ip->version == 4 ? $ip->mask : '/'.$o->prefix) ); push( @cell_data, ($ip->version == 4 ? $ip->broadcast->addr : "n/a") ); ################ @@ -1365,8 +1365,8 @@ } }else{ $num_addresses = $o->num_addr; - $first_address = $ip->network->addr; - $last_address = $ip->broadcast->addr; + $first_address = $ip->network->canon; + $last_address = $ip->broadcast->canon; } push( @cell_data, ($num_addresses." (". $first_address." - ".$last_address.")") ); diff --git a/lib/Netdot/Model/Ipblock.pm b/lib/Netdot/Model/Ipblock.pm index 0bad1bcb8..2a2fef7d2 100644 --- a/lib/Netdot/Model/Ipblock.pm +++ b/lib/Netdot/Model/Ipblock.pm @@ -4,7 +4,7 @@ use base 'Netdot::Model'; use warnings; use strict; use Math::BigInt; -use NetAddr::IP; +use NetAddr::IP qw(:lower); use Net::Patricia 1.19_01; use Storable qw(nfreeze thaw); use Scalar::Util qw(blessed);