dnsforward -- trim dot in the end of hostname, dnsfilter does not expect it there
This commit is contained in:
parent
9089122b56
commit
a6e0a17454
|
@ -5,6 +5,7 @@ import (
|
||||||
"log"
|
"log"
|
||||||
"net"
|
"net"
|
||||||
"reflect"
|
"reflect"
|
||||||
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"github.com/AdguardTeam/AdGuardHome/dnsfilter"
|
"github.com/AdguardTeam/AdGuardHome/dnsfilter"
|
||||||
|
@ -406,7 +407,7 @@ func (s *Server) handlePacket(p []byte, addr net.Addr, conn *net.UDPConn) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
host := msg.Question[0].Name
|
host := strings.TrimSuffix(msg.Question[0].Name, ".")
|
||||||
res, err := s.dnsFilter.CheckHost(host)
|
res, err := s.dnsFilter.CheckHost(host)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("dnsfilter failed to check host '%s': %s", host, err)
|
log.Printf("dnsfilter failed to check host '%s': %s", host, err)
|
||||||
|
|
Loading…
Reference in New Issue