- Timestamp:
- 09/20/22 17:58:38 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB/ExportBIND.pm
r865 r866 360 360 return if $val->{isv6}; 361 361 362 if ($val->masklen <= 16) { 363 foreach my $sub ($val->split(16)) { 364 __publish_template_bind($sub, $recflags, $host, $zonefiles->{$loc}, $ttl, $stamp, $loc, $zone, 1); 365 } 366 } else { 367 __publish_template_bind($val, $recflags, $host, $zonefiles->{$loc}, $ttl, $stamp, $loc, $zone, 1); 368 } 369 } # PTR template 370 371 elsif ($type == 65283) { # A+PTR template 372 $val = NetAddr::IP->new($val); 373 # Just In Case. An A+PTR should be impossible to add to a v6 revzone via API. 374 return if $val->{isv6}; 375 376 if ($val->masklen < 16) { 377 foreach my $sub ($val->split(16)) { 378 __publish_template_bind($sub, $recflags, $host, $zonefiles->{$loc}, $ttl, $stamp, $loc, $zone, 0); 379 } 380 } else { 381 __publish_template_bind($val, $recflags, $host, $zonefiles->{$loc}, $ttl, $stamp, $loc, $zone, 0); 382 } 383 } # A+PTR template 384 385 elsif ($type == 65284) { # AAAA+PTR template 386 # Stub for completeness. Could be exported to DNS software that supports 387 # some degree of internal automagic in generic-record-creation 388 # (eg http://search.cpan.org/dist/AllKnowingDNS/ ) 389 } # AAAA+PTR template 390 391 } # printrec_bind() 392 393 362 394 sub __publish_template_bind { 363 395 my $sub = shift; … … 410 442 } 411 443 } 412 } # __publish_subnet_bind() 413 414 if ($val->masklen <= 16) { 415 foreach my $sub ($val->split(16)) { 416 __publish_subnet($sub, $recflags, $host, $zonefiles->{$loc}, $ttl, $stamp, $loc, $zone, 1); 417 } 418 } else { 419 __publish_subnet($val, $recflags, $host, $zonefiles->{$loc}, $ttl, $stamp, $loc, $zone, 1); 420 } 421 } # PTR template 422 423 elsif ($type == 65283) { # A+PTR template 424 $val = NetAddr::IP->new($val); 425 # Just In Case. An A+PTR should be impossible to add to a v6 revzone via API. 426 return if $val->{isv6}; 427 428 if ($val->masklen < 16) { 429 foreach my $sub ($val->split(16)) { 430 $self->__publish_subnet($sub, $recflags, $host, $zonefiles->{$loc}, $ttl, $stamp, $loc, $zone, 0); 431 } 432 } else { 433 $self->__publish_subnet($val, $recflags, $host, $zonefiles->{$loc}, $ttl, $stamp, $loc, $zone, 0); 434 } 435 } # A+PTR template 436 437 elsif ($type == 65284) { # AAAA+PTR template 438 # Stub for completeness. Could be exported to DNS software that supports 439 # some degree of internal automagic in generic-record-creation 440 # (eg http://search.cpan.org/dist/AllKnowingDNS/ ) 441 } # AAAA+PTR template 442 443 } # printrec_bind() 444 444 } # __publish_template_bind() 445 445 446 446 1;
Note:
See TracChangeset
for help on using the changeset viewer.