Changed local domain handling

1. The local domain is now ".weave.local", which is safer from TLD
 pollution
 2. If the name given for an IP isn't a subdomain of the local domain,
 ignore it
This commit is contained in:
Michael Bridgen committed 2014-10-20 18:11:14 +01:00
1 parent bce06d2e9b
commit d3d07deec6
2 files changed
+13 -8

No files matched your search

+2 -2
View File
@@ -8,7 +8,7 @@ import (
)
const (
LOCAL_DOMAIN = "weave"
LOCAL_DOMAIN = "weave.local."
)
func makeDNSFailResponse(r *dns.Msg) *dns.Msg {
@@ -70,7 +70,7 @@ func notUsHandler() dns.HandlerFunc {
}
func StartServer(zone Zone, iface *net.Interface, dnsPort int, httpPort int, wait int) error {
go ListenHttp(zone, httpPort)
go ListenHttp(LOCAL_DOMAIN, zone, httpPort)
mdnsClient, err := NewMDNSClient()
if err != nil {