6 |
use Net::DNS::Nameserver; |
use Net::DNS::Nameserver; |
7 |
use Net::DNS::Resolver; |
use Net::DNS::Resolver; |
8 |
use Data::Dump qw/dump/; |
use Data::Dump qw/dump/; |
9 |
use CouchDB; |
use store; |
10 |
|
|
11 |
use server; |
use server; |
12 |
use client; |
use client; |
106 |
$data; |
$data; |
107 |
} @ans ]; |
} @ans ]; |
108 |
|
|
109 |
CouchDB::audit( 'response', $audit ); |
store::audit( 'response', $audit ); |
110 |
|
|
111 |
# mark the answer as authoritive (by setting the 'aa' flag |
# mark the answer as authoritive (by setting the 'aa' flag |
112 |
return ($rcode, \@ans, \@auth, \@add, { aa => 1 }); |
return ($rcode, \@ans, \@auth, \@add, { aa => 1 }); |
122 |
Verbose => $debug, |
Verbose => $debug, |
123 |
) || die "couldn't create nameserver object\n"; |
) || die "couldn't create nameserver object\n"; |
124 |
|
|
125 |
CouchDB::audit('start', { port => 53, domain => $server::domain }); |
store::audit('start', { port => 53, domain => $server::domain }); |
126 |
warn "DNS $server::domain"; |
warn "DNS $server::domain"; |
127 |
|
|
128 |
$ns->main_loop; |
$ns->main_loop; |