coredns plugin -- fix SHOULD NOT HAPPEN spam when incoming request is for root servers
This commit is contained in:
@@ -148,9 +148,9 @@ func (r Reason) Matched() bool {
|
||||
|
||||
// CheckHost tries to match host against rules, then safebrowsing and parental if they are enabled
|
||||
func (d *Dnsfilter) CheckHost(host string) (Result, error) {
|
||||
// sometimes DNS clients will try to resolve ".", which in turns transforms into "" when it reaches here
|
||||
// sometimes DNS clients will try to resolve ".", which is a request to get root servers
|
||||
if host == "" {
|
||||
return Result{Reason: FilteredInvalid}, nil
|
||||
return Result{Reason: NotFilteredNotFound}, nil
|
||||
}
|
||||
host = strings.ToLower(host)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user