- Timestamp:
- 01/02/14 13:22:11 (11 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r578 r581 213 213 force_refresh => 1, 214 214 lowercase => 0, # mangle as little as possible by default 215 showrec_arpa_ns => 0, # show formal .arpa zone name instead of logical CIDR on reverse NS records 215 216 ); 216 217 … … 242 243 243 244 # Several settings are booleans. Handle multiple possible ways of setting them. 244 for my $boolopt ('log_failures', 'force_refresh', 'lowercase', 'usecache' ) {245 for my $boolopt ('log_failures', 'force_refresh', 'lowercase', 'usecache', 'showrec_arpa_ns') { 245 246 if ($self->{$boolopt} ne '1' && $self->{$boolopt} ne '0') { 246 247 # true/false, on/off, yes/no all valid. … … 1342 1343 $cfg->{force_refresh} = $1 if /^force_refresh\s*=\s*([a-z01]+)/i; 1343 1344 $cfg->{lowercase} = $1 if /^lowercase\s*=\s*([a-z01]+)/i; 1345 $cfg->{showrec_arpa_ns} = $1 if /^showrec_arpa_ns\s*=\s*([a-z01]+)/i; 1344 1346 # not supported in dns.cgi yet 1345 1347 # $cfg->{templatedir} = $1 if m{^templatedir\s*=\s*([a-z0-9/_.-]+)}i; -
trunk/dns.cgi
r570 r581 2004 2004 2005 2005 foreach my $rec (@$foo2) { 2006 # NS records. Need to do this first before we convert the type-value to the text representation 2007 if ($rev eq 'y' && $dnsdb->{showrec_arpa_ns} && $rec->{type} == $reverse_typemap{NS}) { 2008 my $tmp = new NetAddr::IP $rec->{val}; 2009 $rec->{val} = DNSDB::_ZONE($tmp, 'ZONE', 'r', '.').($tmp->{isv6} ? '.ip6.arpa' : '.in-addr.arpa'); 2010 } 2006 2011 $rec->{type} = $typemap{$rec->{type}}; 2007 2012 $rec->{fwdzone} = $rev eq 'n'; -
trunk/dnsdb.conf
r559 r581 38 38 #lowercase = 0 39 39 40 # Show formal .arpa zone name instead of usual CIDR for reverse zone NS records? 41 #showrec_arpa_ns = 0 42 40 43 ## General RPC options 41 44 # may already be obsolete. how do we want to run RPC requests? -
trunk/export.pl
r496 r581 29 29 my $dnsdb = new DNSDB; 30 30 31 #open TINYDATA, ">small/tinydata"; 31 32 open TINYDATA, ">tinydata"; 32 33 33 $dnsdb->export('tiny', *TINYDATA) ;34 $dnsdb->export('tiny', *TINYDATA) or die "fatal: ".$dnsdb->errstr."\n"; -
trunk/textrecs.cgi
r580 r581 83 83 $rec->{val} = "$rec->{distance} $rec->{weight} $rec->{port} $rec->{val}" if $rec->{type} eq 'SRV'; 84 84 if ($webvar{revrec} eq 'y') { 85 if ($dnsdb->{showrec_arpa_ns} && $rec->{type} eq 'NS') { 86 my $tmp = new NetAddr::IP $rec->{val}; 87 $rec->{val} = DNSDB::_ZONE($tmp, 'ZONE', 'r', '.').($tmp->{isv6} ? '.ip6.arpa' : '.in-addr.arpa'); 88 } 85 89 printf "%-16s\t%d\t%s\t%s\n", $rec->{val}, $rec->{ttl}, $rec->{type}, $rec->{host}; 86 90 } else {
Note:
See TracChangeset
for help on using the changeset viewer.