bind dns to $server::ip
authorDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 19 Jul 2011 11:52:21 +0000 (11:52 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 19 Jul 2011 11:52:21 +0000 (11:52 +0000)
lib/PXElator/dnsd.pm

index 2a68c71..b443be3 100644 (file)
@@ -115,6 +115,7 @@ warn "## no $qname in ",dump( $ptr_cache );
 sub start {
        my $ns = Net::DNS::Nameserver->new(
                LocalPort    => 53,
+               LocalAddr    => $server::ip,
                ReplyHandler => sub {
                        server->refresh;
                        reply_handler(@_);
@@ -122,7 +123,7 @@ sub start {
                Verbose      => $debug,
        ) || die "couldn't create nameserver object\n";
 
-       store::audit('start', { port => 53, domain => $server::domain });
+       store::audit('start', { ip => $server::ip, port => 53, domain => $server::domain });
        warn "DNS $server::domain";
 
        $ns->main_loop;