zettio/weave#366 - improved configuration for th DNSServer, where we can specify the local domain name among other things... (missing some unit tests for this customized local domain)
This commit is contained in:
1 parent
d1400bc233
commit
bbd69170f9
5 files changed
+99
-47
No files matched your search
@@ -35,7 +35,7 @@ func (s *MDNSServer) addrIsLocal(testaddr net.Addr) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (s *MDNSServer) Start(ifi *net.Interface) error {
|
||||
func (s *MDNSServer) Start(ifi *net.Interface, localDomain string) error {
|
||||
conn, err := LinkLocalMulticastListener(ifi)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -69,7 +69,7 @@ func (s *MDNSServer) Start(ifi *net.Interface) error {
|
||||
})
|
||||
|
||||
mux := dns.NewServeMux()
|
||||
mux.HandleFunc(LOCAL_DOMAIN, handleLocal)
|
||||
mux.HandleFunc(localDomain, handleLocal)
|
||||
mux.HandleFunc(RDNS_DOMAIN, handleReverse)
|
||||
|
||||
go dns.ActivateAndServe(nil, conn, mux)
|
||||
|
||||
Reference in new issue
Block a user