Permalink
Browse files

Bugfixes: mix/max host on iprange view + vtp update status

  • Loading branch information...
1 parent 52905d6 commit b43f03f18cf72774b04b189eaa9fd69b936d6b24 @rigorighetti rigorighetti committed Dec 7, 2011
Showing with 11 additions and 4 deletions.
  1. +9 −2 lib/Manoc/Controller/IpRange.pm
  2. +2 −2 lib/Manoc/Netwalker/DeviceUpdater.pm
@@ -335,11 +335,18 @@ sub view : Chained('object') : PathPart('view') : Args(0) {
distinct => 1,
}
);
+
+ my $min_host = $range->from_addr;
+ my $max_host = $range->to_addr;
+
+ $range->netmask and $min_host = int2ip( ip2int( $range->from_addr ) + 1 ) and
+ $max_host = int2ip( ip2int( $range->to_addr ) - 1 );
+
my %param;
$param{prefix} = $range->netmask ? netmask2prefix( $range->netmask ) : '';
$param{wildcard} = prefix2wildcard( $param{prefix} );
- $param{min_host} = int2ip( ip2int( $range->from_addr ) + 1 );
- $param{max_host} = int2ip( ip2int( $range->to_addr ) - 1 );
+ $param{min_host} = $min_host;
+ $param{max_host} = $max_host;
$param{numhost} = ip2int( $param{max_host} ) - ip2int( $param{min_host} ) - 1;
$param{ipaddr_num} = $rs->count();
@@ -221,7 +221,7 @@ sub update_all_info {
$self->update_cdp_neighbors;
$self->update_ifstatus and $self->update_if_table;
$self->entry->get_mat() and $self->update_mat;
- $self->update_vtp_interval and $self->update_vtp_database;
+ $self->update_vtp_database;
$self->entry->get_arp() and $self->update_arp_table;
#update_dot11;
@@ -447,7 +447,7 @@ sub update_vtp_database {
my $vlan_db = $source->vtp_database;
- $self->log->info( "getting vtp info from", $entry->id );
+ $self->log->info( "getting vtp info from ", $entry->id );
if ( !defined($vlan_db) ) {
$self->log->error("cannot retrieve vtp info");
$self->report->add_error("cannot retrieve vtp info");

0 comments on commit b43f03f

Please sign in to comment.