Skip to content

Commit

Permalink
Merge pull request #18 in DNS/adguard-dns from nonfqdn to master
Browse files Browse the repository at this point in the history
* commit 'aa2e5500e72864727a0dcd196f37e84931cfa30a':
  coredns plugin -- do not filter out non-FQDN's -- otherwise it breaks serving /etc/hosts
  • Loading branch information
hmage committed Sep 11, 2018
2 parents e2cf9ff + aa2e550 commit 3a92520
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions coredns_plugin/coredns_plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -370,14 +370,6 @@ func (d *Plugin) serveDNSInternal(ctx context.Context, w dns.ResponseWriter, r *
}
for _, question := range r.Question {
host := strings.ToLower(strings.TrimSuffix(question.Name, "."))
// if input is empty host, filter it out right away
if index := strings.IndexByte(host, byte('.')); index == -1 {
rcode, err := writeNXdomain(ctx, w, r)
if err != nil {
return rcode, err, dnsfilter.Result{}
}
return rcode, err, dnsfilter.Result{Reason: dnsfilter.FilteredInvalid}
}
// is it a safesearch domain?
if val, ok := d.d.SafeSearchDomain(host); ok {
rcode, err := d.replaceHostWithValAndReply(ctx, w, r, host, val, question)
Expand Down

0 comments on commit 3a92520

Please sign in to comment.