85 |
warn "rcode: $rcode ",dump( @ans ); |
warn "rcode: $rcode ",dump( @ans ); |
86 |
|
|
87 |
$audit->{rcode} = $rcode; |
$audit->{rcode} = $rcode; |
88 |
$audit->{ans} = [ @ans ]; |
$audit->{ans} = [ map { |
89 |
|
my $data; |
90 |
|
foreach my $n ( keys %$_ ) { |
91 |
|
$data->{$n} = $_->{$n}; |
92 |
|
} |
93 |
|
$data; |
94 |
|
} @ans ]; |
95 |
|
|
96 |
CouchDB::audit( 'response', $audit ); |
CouchDB::audit( 'response', $audit ); |
97 |
|
|
106 |
Verbose => $debug, |
Verbose => $debug, |
107 |
) || die "couldn't create nameserver object\n"; |
) || die "couldn't create nameserver object\n"; |
108 |
|
|
109 |
CouchDB::audit('start', { listen => { port => 53, domain_name => $server::domain_name } }); |
CouchDB::audit('start', { port => 53, domain_name => $server::domain_name }); |
110 |
warn "DNS $server::domain_name"; |
warn "DNS $server::domain_name"; |
111 |
|
|
112 |
$ns->main_loop; |
$ns->main_loop; |