Revert "Resolve unqualified names in the local WeaveDNS domain"
This commit is contained in:
1 parent
39a1f2163f
commit
18032015b9
9 files changed
+43
-152
No files matched your search
@@ -4,6 +4,7 @@ import (
|
||||
"net"
|
||||
"time"
|
||||
|
||||
"github.com/miekg/dns"
|
||||
. "github.com/weaveworks/weave/common"
|
||||
)
|
||||
|
||||
@@ -61,7 +62,7 @@ func (zone *ZoneDb) LookupName(name string) (res []ZoneRecord, err error) {
|
||||
defer zone.mx.RUnlock()
|
||||
|
||||
// note: LookupName() is usually called from the mDNS server, so we do not touch the name
|
||||
name = normalizeName(name, zone.domain)
|
||||
name = dns.Fqdn(name)
|
||||
Log.Debugf("[zonedb] Looking for name '%s' in local database", name)
|
||||
return zone.lookup(name, func(ns *nameSet) []*recordEntry { return ns.getEntriesForName(name) })
|
||||
}
|
||||
@@ -116,7 +117,7 @@ func (zone *ZoneDb) domainLookup(target string, lfun ZoneLookupFunc) (res []Zone
|
||||
// Perform a lookup for a name in the zone
|
||||
// The name can be resolved locally with the local database or with some other resolution method (eg, a mDNS query)
|
||||
func (zone *ZoneDb) DomainLookupName(name string) (res []ZoneRecord, err error) {
|
||||
name = normalizeName(name, zone.domain)
|
||||
name = dns.Fqdn(name)
|
||||
Log.Debugf("[zonedb] Looking for name '%s' in local(&remote) database", name)
|
||||
|
||||
zone.mx.Lock()
|
||||
@@ -266,7 +267,7 @@ func (zone *ZoneDb) updater(name string) (nextTime time.Time) {
|
||||
}
|
||||
|
||||
// perform the refresh for this name
|
||||
fullName := normalizeName(name, zone.domain)
|
||||
fullName := dns.Fqdn(name)
|
||||
startTime := zone.clock.Now()
|
||||
Log.Debugf("[zonedb] Refreshing name '%s' with mDNS...", fullName)
|
||||
res, _ := zone.mdnsCli.InsistentLookupName(fullName)
|
||||
|
||||
Reference in new issue
Block a user