Changeset 186


Ignore:
Timestamp:
Nov 10, 2016, 6:19:49 PM (8 years ago)
Author:
g7moreau
Message:
  • Limit reverse DNS check the first time
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/klask

    r185 r186  
    221221   my $interface = shift || q{*};
    222222   my $type      = shift || q{fast};
     223   my $already   = shift || q{yes};
    223224
    224225   my %ret = (
     
    234235
    235236   # perl -MSocket -E 'say scalar gethostbyaddr(inet_aton("194.254.66.240"), AF_INET)'
    236    my $hostname_fq = scalar gethostbyaddr($packed_ip, AF_INET);
     237   my $hostname_fq = scalar gethostbyaddr($packed_ip, AF_INET) if $already eq 'yes';
    237238   $ret{hostname_fq} = $hostname_fq if defined $hostname_fq;
    238239
     
    981982         printf ' %-8s %-14s', $current_interface, $one_computer;
    982983
    983          my %resol_arp = resolve_ip_arp_host($one_computer, $current_interface);
     984         my $already_exist = exists $computerdb->{$one_computer} ? 'yes' : 'no';
     985         my %resol_arp = resolve_ip_arp_host($one_computer, $current_interface, 'fast', $already_exist);
    984986
    985987         # do not search on router connection (why ?)
     
    18661868         my $packed_ip = scalar gethostbyname($ip);
    18671869         my $hostname_fq = 'unknown';
    1868             $hostname_fq = scalar gethostbyaddr($packed_ip, AF_INET) || 'unknown' if defined $packed_ip;
     1870            $hostname_fq = scalar gethostbyaddr($packed_ip, AF_INET) || 'unknown' if defined $packed_ip and get_current_scan_mode($vlan) eq 'active';
    18691871
    18701872         next LOOP_ON_IP_ADDRESS if $hostname_fq =~ m/$RE_FLOAT_HOSTNAME/;
Note: See TracChangeset for help on using the changeset viewer.