Change Lookup method names
The Local was redundant (and inaccurate in the case of the mDNS client implementation), and otherwise they are too nondescript.
This commit is contained in:
1 parent
5f642d390c
commit
ff45bcf945
7 files changed
+22
-22
No files matched your search
@@ -37,7 +37,7 @@ func queryHandler(lookups []Lookup) dns.HandlerFunc {
|
||||
Debug.Printf("Query: %+v", q)
|
||||
if q.Qtype == dns.TypeA {
|
||||
for _, lookup := range lookups {
|
||||
if ip, err := lookup.LookupLocal(q.Name); err == nil {
|
||||
if ip, err := lookup.LookupName(q.Name); err == nil {
|
||||
m := makeAddressReply(r, &q, []net.IP{ip})
|
||||
w.WriteMsg(m)
|
||||
return
|
||||
@@ -56,7 +56,7 @@ func rdnsHandler(lookups []Lookup) dns.HandlerFunc {
|
||||
Debug.Printf("Reverse query: %+v", q)
|
||||
if q.Qtype == dns.TypePTR {
|
||||
for _, lookup := range lookups {
|
||||
if name, err := lookup.ReverseLookupLocal(q.Name); err == nil {
|
||||
if name, err := lookup.LookupInaddr(q.Name); err == nil {
|
||||
m := makePTRReply(r, &q, []string{name})
|
||||
w.WriteMsg(m)
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user