Changeset 310 for trunk


Ignore:
Timestamp:
Oct 19, 2017, 10:00:46 PM (7 years ago)
Author:
g7moreau
Message:
  • Protect key portignore help ip match
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/klask

    r309 r310  
    208208else {
    209209   print {*STDERR} "klask: command $cmd not found\n\n";
    210    $CMD_DB{help}->();
     210   $CMD_DB{'help'}->();
    211211   exit 1;
    212212   }
     
    354354
    355355   for my $sw_kind (keys %SWITCH_KIND) {
    356       next if not $sw_snmp_description =~ m/$SWITCH_KIND{$sw_kind}->{match}/ms; # option xms break search, why ?
     356      next if not $sw_snmp_description =~ m/$SWITCH_KIND{$sw_kind}->{'match'}/ms; # option xms break search, why ?
    357357
    358358      return $SWITCH_KIND{$sw_kind}->{'model'};
     
    369369
    370370   for my $sw_kind (keys %SWITCH_KIND) {
    371       next if not $sw_snmp_description =~ m/$SWITCH_KIND{$sw_kind}->{match}/ms; # option xms break search, why ?
     371      next if not $sw_snmp_description =~ m/$SWITCH_KIND{$sw_kind}->{'match'}/ms; # option xms break search, why ?
    372372      last if not exists $SWITCH_KIND{$sw_kind}->{'revision'};
    373373
     
    556556      # 21->24 45->48
    557557      SWITCH_PORT_IGNORE:
    558       for my $portignore (@{$sw->{portignore}}) {
     558      for my $portignore (@{$sw->{'portignore'}}) {
    559559         next LOOP_ON_SWITCH if $swport_hr eq $portignore;
    560560         my ($swport_hr_limited) = split /$SEP_AGGREGATOR_PORT/, $swport_hr; # Beginning of the swith port (Aggregator)
     
    604604
    605605         SWITCH_PORT_IGNORE:
    606          for my $portignore (@{$sw->{portignore}}) {
     606         for my $portignore (@{$sw->{'portignore'}}) {
    607607            if ($swport_hr eq $portignore) {
    608608               $session->close;
     
    13411341      }
    13421342   for my $sw (@SWITCH_LIST) {
    1343       push @{$sw->{portignore}}, $db_switch_output_port{$sw->{'hostname'}}  if exists $db_switch_output_port{$sw->{'hostname'}};
     1343      push @{$sw->{'portignore'}}, $db_switch_output_port{$sw->{'hostname'}}  if exists $db_switch_output_port{$sw->{'hostname'}};
    13441344      if ( exists $db_switch_chained_port{$sw->{'hostname'}} ) {
    13451345         chop $db_switch_chained_port{$sw->{'hostname'}};
    1346          push @{$sw->{portignore}}, split m/ : /xms, $db_switch_chained_port{$sw->{'hostname'}};
    1347          }
    1348 #      print "$sw->{'hostname'} ++ @{$sw->{portignore}}\n";
     1346         push @{$sw->{'portignore'}}, split m/ : /xms, $db_switch_chained_port{$sw->{'hostname'}};
     1347         }
     1348#      print "$sw->{'hostname'} ++ @{$sw->{'portignore'}}\n";
    13491349      }
    13501350   }
     
    15901590               or $mactimedb{$ip_mac}->{'hostname_fq'} =~ m/$RE_FLOAT_HOSTNAME/
    15911591               )) {
    1592             print "remove ip ".$mactimedb{$ip_mac}->{ip}."\n" if $verbose;
    1593             delete $computerdb->{$mactimedb{$ip_mac}->{ip}};
     1592            print "remove ip ".$mactimedb{$ip_mac}->{'ip'}."\n" if $verbose;
     1593            delete $computerdb->{$mactimedb{$ip_mac}->{'ip'}};
    15941594            $database_has_changed++;
    15951595            }
     
    20462046      next LOOP_ON_RECENT_COMPUTER if $switchportdb{$swpt}->{'hostname_fq'} !~ m/$RE_FLOAT_HOSTNAME/;
    20472047
    2048       my $src_ip = $switchportdb{$swpt}->{ip};
     2048      my $src_ip = $switchportdb{$swpt}->{'ip'};
    20492049      my $src_timestamp = 0;
    20502050      LOOP_ON_IP_ADDRESS:
Note: See TracChangeset for help on using the changeset viewer.