Changeset 362
- Timestamp:
- Sep 14, 2018, 10:13:58 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ddt/ddt
r361 r362 21 21 use strict; 22 22 #use warnings; 23 use version; our $VERSION = version->declare('0.11. 8');23 use version; our $VERSION = version->declare('0.11.9'); 24 24 25 25 use Getopt::Long qw(GetOptions); … … 2770 2770 for my $ip (NetAddr::IP->new($ip_range)->hostenum()) { 2771 2771 $ip =~ s{/32$}{}; 2772 print "$ip\n";2773 2772 2774 2773 my $dns_hostname_fq = scalar gethostbyaddr(inet_aton($ip), AF_INET); … … 2780 2779 my $ip_address = inet_ntoa($packed_ip); 2781 2780 if ($ip ne $ip_address) { 2782 print "Error: bad IP $ip for reverse DNS on $dns_hostname_fq\n"; 2783 #next LOOP_ON_IP; 2781 print "Error: bad IP $ip for reverse DNS on $dns_hostname_fq sector $sector_current\n"; 2784 2782 } 2785 2783 } 2786 2784 2787 # Verify direct return same host 2785 # Verify direct return same hostname 2788 2786 LOOP_ON_COMPUTER: 2789 2787 for my $computer (@{$computer_db->{$sector_current}}) { … … 2792 2790 next LOOP_ON_COMPUTER if $attribute->{'ip'} ne $ip; 2793 2791 2794 next LOOP_ON_IP if $attribute->{'hostname'} eq $dns_hostname;2795 2796 print "Error: DNS bad host $dns_hostname for IP $ip\n"; 2792 print "Error: bad DNS host $dns_hostname / DDT host $attribute->{'hostname'} in sector $sector_current with IP $ip\n" 2793 if $attribute->{'hostname'} ne $dns_hostname; 2794 2797 2795 next LOOP_ON_IP; 2798 2796 } … … 2800 2798 # Declare in DNS but not in DDT 2801 2799 print "Error: DNS host $dns_hostname in sector $sector_current with IP $ip not declare in DDT database\n" if $dns_hostname ne ''; 2802 # Normally never arrive here2803 2804 #if ($computer_db->{$sector_current}{}$attribute->{'hostname'} ne $dns_hostname) {2805 # print "$mac_address ($sector_current) $ip - $dns_hostname / $attribute->{'hostname'} # $attribute->{'comment'}\n";2806 # next LOOP_ON_IP;2807 # }2808 2800 } 2809 2801 }
Note: See TracChangeset
for help on using the changeset viewer.