Changeset 772


Ignore:
Timestamp:
02/28/19 18:06:50 (5 years ago)
Author:
Kris Deugau
Message:

/trunk

Whitespace fiddling in aid of certain code editors that can't sanely fold:

if {
} else {
}

Also likely to help somewhat in future migration of per-rectype objectification

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/DNSDB.pm

    r768 r772  
    65026502    print $datafile "Z$zone:$primary:$email"."::$refresh:$retry:$expire:$min_ttl:$ttl:$stamp:$loc\n"
    65036503      or die $!;
    6504 
    6505   } elsif ($typemap{$type} eq 'A') {
    6506 
     6504  } # SOA
     6505
     6506  elsif ($typemap{$type} eq 'A') {
    65076507    ($host,$val) = __revswap($host,$val) if $revrec eq 'y';
    65086508    print $datafile "+$host:$val:$ttl:$stamp:$loc\n" or die $!;
    6509 
    6510   } elsif ($typemap{$type} eq 'NS') {
    6511 
     6509  } # A
     6510
     6511  elsif ($typemap{$type} eq 'NS') {
    65126512    if ($revrec eq 'y') {
    65136513      $val = NetAddr::IP->new($val);
     
    65356535      print $datafile "\&$host"."::$val:$ttl:$stamp:$loc\n" or die $!;
    65366536    }
    6537 
    6538   } elsif ($typemap{$type} eq 'AAAA') {
    6539 
     6537  } # NS
     6538
     6539  elsif ($typemap{$type} eq 'AAAA') {
    65406540    ($host,$val) = __revswap($host,$val) if $revrec eq 'y';
    65416541    my $altgrp = 0;
     
    65596559    }
    65606560    print $datafile "$prefix:$ttl:$stamp:$loc\n" or die $!;
    6561 
    6562   } elsif ($typemap{$type} eq 'MX') {
    6563 
     6561  } # AAAA
     6562
     6563  elsif ($typemap{$type} eq 'MX') {
    65646564    ($host,$val) = __revswap($host,$val) if $revrec eq 'y';
    65656565    print $datafile "\@$host"."::$val:$dist:$ttl:$stamp:$loc\n" or die $!;
    6566 
    6567   } elsif ($typemap{$type} eq 'TXT') {
    6568 
     6566  } # MX
     6567
     6568  elsif ($typemap{$type} eq 'TXT') {
    65696569    ($host,$val) = __revswap($host,$val) if $revrec eq 'y';
    65706570# le sigh.  Some idiot DNS implementations don't seem to like tinydns autosplitting
     
    66106610#:3600
    66116611
    6612   } elsif ($typemap{$type} eq 'CNAME') {
    6613 
     6612  } # TXT
     6613
     6614  elsif ($typemap{$type} eq 'CNAME') {
    66146615    ($host,$val) = __revswap($host,$val) if $revrec eq 'y';
    66156616    print $datafile "C$host:$val:$ttl:$stamp:$loc\n" or die $!;
    6616 
    6617   } elsif ($typemap{$type} eq 'SRV') {
    6618 
     6617  } # CNAME
     6618
     6619  elsif ($typemap{$type} eq 'SRV') {
    66196620    ($host,$val) = __revswap($host,$val) if $revrec eq 'y';
    66206621
     
    66296630    }
    66306631    print $datafile "$prefix\\000:$ttl:$stamp:$loc\n" or die $!;
    6631 
    6632   } elsif ($typemap{$type} eq 'RP') {
    6633 
     6632  } # SRV
     6633
     6634  elsif ($typemap{$type} eq 'RP') {
    66346635    ($host,$val) = __revswap($host,$val) if $revrec eq 'y';
    66356636    # RP consists of two mostly free-form strings.
     
    66466647    }
    66476648    print $datafile "$prefix\\000:$ttl:$stamp:$loc\n" or die $!;
    6648 
    6649   } elsif ($typemap{$type} eq 'PTR') {
    6650 
     6649  } # RP
     6650
     6651  elsif ($typemap{$type} eq 'PTR') {
    66516652    $$recflags{$val}++;
    66526653    if ($revrec eq 'y') {
     
    66776678      print $datafile "^$host:$val:$ttl:$stamp:$loc\n" or die $!;
    66786679    }
    6679 
    6680   } elsif ($type == 65280) { # A+PTR
    6681 
     6680  } # PTR
     6681
     6682  elsif ($type == 65280) { # A+PTR
    66826683    $$recflags{$val}++;
    66836684    print $datafile "=$host:$val:$ttl:$stamp:$loc\n" or die $!;
    6684 
    6685   } elsif ($type == 65281) { # AAAA+PTR
    6686 
     6685  } # A+PTR
     6686
     6687  elsif ($type == 65281) { # AAAA+PTR
    66876688    $$recflags{$val}++;
    66886689    # treat these as two separate records.  since tinydns doesn't have
     
    66976698##fixme: add a config flag to indicate use of the patch from http://www.fefe.de/dns/
    66986699# type 6 is for AAAA+PTR, type 3 is for AAAA
    6699 
    6700   } elsif ($type == 65282) { # PTR template
    6701 
     6700  } # AAAA+PTR
     6701
     6702  elsif ($type == 65282) { # PTR template
    67026703    # only useful for v4 with standard DNS software, since this expands all
    67036704    # IPs in $zone (or possibly $val?) with autogenerated records
     
    67126713      $self->__publish_subnet($val, $recflags, $host, $datafile, $ttl, $stamp, $loc, $zone, 1);
    67136714    }
    6714 
    6715   } elsif ($type == 65283) { # A+PTR template
    6716 
     6715  } # PTR template
     6716
     6717  elsif ($type == 65283) { # A+PTR template
    67176718    $val = NetAddr::IP->new($val);
    67186719    # Just In Case.  An A+PTR should be impossible to add to a v6 revzone via API.
     
    67266727      $self->__publish_subnet($val, $recflags, $host, $datafile, $ttl, $stamp, $loc, $zone, 0);
    67276728    }
    6728 
    6729   } elsif ($type == 65284) { # AAAA+PTR template
     6729  } # A+PTR template
     6730
     6731  elsif ($type == 65284) { # AAAA+PTR template
    67306732    # Stub for completeness.  Could be exported to DNS software that supports
    67316733    # some degree of internal automagic in generic-record-creation
    67326734    # (eg http://search.cpan.org/dist/AllKnowingDNS/ )
    6733 
    6734   } elsif ($type == 65285) { # Delegation
     6735  } # AAAA+PTR template
     6736
     6737  elsif ($type == 65285) { # Delegation
    67356738    # This is intended for reverse zones, but may prove useful in forward zones.
    67366739
     
    67576760      }
    67586761    }
    6759 
    6760   } elsif ($type == 65300) { # ALIAS
     6762  } # Delegation
     6763
     6764  elsif ($type == 65300) { # ALIAS
    67616765    # Implemented as a unique record in parallel with many other
    67626766    # management tools, for clarity VS formal behviour around CNAME
     
    67886792      print $datafile "+$host:$subip:$attl:$stamp:$loc\n" or die $!;
    67896793    }
     6794  } # ALIAS
    67906795
    67916796##
     
    67936798##
    67946799
    6795   } elsif ($type == 44) { # SSHFP
    6796 
     6800  elsif ($type == 44) { # SSHFP
    67976801    ($host,$val) = __revswap($host,$val) if $revrec eq 'y';
    67986802
     
    68066810    print $datafile "$rec:$ttl:$stamp:$loc\n" or die $!;
    68076811
    6808   } else {
     6812  } # SSHFP
     6813
     6814  else {
    68096815    # raw record.  we don't know what's in here, so we ASS-U-ME the user has
    68106816    # put it in correctly, since either the user is messing directly with the
     
    68176823    #print $datafile ":$host:$type:$val:$ttl:$stamp:$loc\n";
    68186824
    6819   } # record type if-else
     6825  } # "other"
    68206826
    68216827} # end _printrec_tiny()
Note: See TracChangeset for help on using the changeset viewer.