Changeset 199


Ignore:
Timestamp:
Jan 25, 2017, 11:00:14 PM (8 years ago)
Author:
g7moreau
Message:
  • Add fake-ip functionality
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/klask

    r198 r199  
    77use strict;
    88use warnings;
    9 use version; our $VERSION = qv('0.5.7');
     9use version; our $VERSION = qv('0.5.8');
    1010
    1111use Readonly;
     
    21542154   for my $one_switch (@list_all_switch) {
    21552155      my %resol_arp = resolve_ip_arp_host($one_switch, q{*}, q{low}); # arp resolution
     2156      if (exists $SWITCH_DB{$one_switch}{'fake-ip'}) {
     2157         print "WARNING: fake ip on switch $one_switch -> $SWITCH_DB{$one_switch}{'fake-ip'} / $resol_arp{ipv4_address}\n" if $verbose;
     2158         my %resol_arp_alt = resolve_ip_arp_host($SWITCH_DB{$one_switch}{'fake-ip'}, q{*}, q{low}); # arp resolution
     2159         if ($resol_arp_alt{mac_address} ne 'unknow') {
     2160            $resol_arp{mac_address}   = $resol_arp_alt{mac_address};
     2161            $resol_arp{interface}     = $resol_arp_alt{interface};
     2162            $resol_arp{ipv4_address} .= '*';
     2163            }
     2164         }
    21562165      print "Info: switch loop $one_switch\n" if $verbose;
    21572166      next ALL_SWITCH if $resol_arp{mac_address} eq 'unknow';
     
    21792188
    21802189   ALL_SWITCH_IP_ADDRESS:
    2181    for my $ip (Net::Netmask::sort_by_ip_address(@list_switch_ipv4)) {
     2190   for my $ip (@list_switch_ipv4) {
     2191#   for my $ip (Net::Netmask::sort_by_ip_address(@list_switch_ipv4)) {
    21822192
    21832193      print "VERBOSE_5: loop on $db_switch_ip_hostnamefq{$ip}\n" if $verbose;
Note: See TracChangeset for help on using the changeset viewer.