Changeset 811 for trunk/bind-import
- Timestamp:
- 11/24/20 17:18:34 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bind-import
r810 r811 36 36 my %amap; 37 37 my %namemap; 38 my %cmap; 38 39 39 40 if ($zname =~ /\.arpa\.?$/ || $zname =~ m,^[\d./]+$,) { … … 100 101 $name .= ".$zname" if $name !~ /$zname$/ && $zname !~ /\.$/; 101 102 $name = $zname if /^\s*IN/; 102 s/([\w_.-]+)\s+//; 103 $name = $zname if /^\@/; 104 s/([\w\@_.-]+)\s+//; 103 105 my ($class) = /(IN|CS|CH|HS)\s/; 104 106 if ($class) { … … 121 123 my ($type) = /([A-Z-]+)\s/; 122 124 if (!$reverse_typemap{$type}) { 123 print "Unknown type $type, skipping\n ";125 print "Unknown type $type, skipping\n ($_)\n"; 124 126 next; 125 127 } … … 135 137 } 136 138 139 # temp hack for hosts file 137 140 if ($type eq 'A') { 138 141 # if ($amap{$name}) { … … 142 145 # } 143 146 push @{$namemap{$rdata}}, $name; 147 } 148 if ($type eq 'CNAME') { 149 push @{$cmap{$rdata}}, $name; 144 150 } 145 151 … … 162 168 163 169 #print Dumper \%amap; 170 #print Dumper \%namemap; 171 #print Dumper \%cmap; 172 164 173 foreach my $n (keys %amap) { 165 174 foreach my $ip (@{$amap{$n}}) { … … 169 178 } 170 179 171 #print Dumper \%namemap; 172 foreach my $ip (sort keys %namemap) { 173 print "$ip ".join(' ', @{$namemap{$ip}})."\n"; 180 foreach my $c (keys %cmap) { 181 if ($amap{$c}) { 182 print Dumper(\@{$amap{$c}}); 183 } 184 # print $amap{$c}; 174 185 } 186 187 # cname targ -> IP 188 189 #foreach my $ip (sort keys %namemap) { 190 # print "$ip ".join(' ', @{$namemap{$ip}})."\n"; 191 #} 192
Note:
See TracChangeset
for help on using the changeset viewer.