/[pxelator]/lib/PXElator/dnsd.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /lib/PXElator/dnsd.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 392 by dpavlin, Tue Aug 18 22:02:11 2009 UTC revision 393 by dpavlin, Tue Sep 8 16:54:35 2009 UTC
# Line 41  sub reply_handler { Line 41  sub reply_handler {
41    
42          $query->print if $debug;          $query->print if $debug;
43    
44          my $local = $1     if $qname =~ m{^(.+)\.\Q$server::domain_name\E$};          my $local = $1     if $qname =~ m{^(.+)\.\Q$server::domain\E$};
45             $local = $qname if $qname !~ m{\.};             $local = $qname if $qname !~ m{\.};
46    
47          my $ttl = 3600;          my $ttl = 3600;
# Line 61  sub reply_handler { Line 61  sub reply_handler {
61    
62          } elsif ( $qtype eq 'PTR' && $qname =~ m{^([0-9\.]*)\.in-addr\.arpa$} ) {          } elsif ( $qtype eq 'PTR' && $qname =~ m{^([0-9\.]*)\.in-addr\.arpa$} ) {
63                          if ( my $rdata = $ptr_cache->{$1} ) {                          if ( my $rdata = $ptr_cache->{$1} ) {
64                                  $rdata .= '.' . $server::domain_name;                                  $rdata .= '.' . $server::domain;
65                                  push @ans, Net::DNS::RR->new("$qname $ttl $qclass $qtype $rdata");                                  push @ans, Net::DNS::RR->new("$qname $ttl $qclass $qtype $rdata");
66                                  $audit->{source} = 'PTR';                                  $audit->{source} = 'PTR';
67                          } else {                          } else {
# Line 107  sub start { Line 107  sub start {
107                  Verbose      => $debug,                  Verbose      => $debug,
108          ) || die "couldn't create nameserver object\n";          ) || die "couldn't create nameserver object\n";
109    
110          CouchDB::audit('start', { port => 53, domain_name => $server::domain_name });          CouchDB::audit('start', { port => 53, domain => $server::domain });
111          warn "DNS $server::domain_name";          warn "DNS $server::domain";
112    
113          $ns->main_loop;          $ns->main_loop;
114  }  }

Legend:
Removed from v.392  
changed lines
  Added in v.393

  ViewVC Help
Powered by ViewVC 1.1.26