diff --git a/internal/dnsforward/dnsforward.go b/internal/dnsforward/dnsforward.go index 3384f6cb..58ea3b72 100644 --- a/internal/dnsforward/dnsforward.go +++ b/internal/dnsforward/dnsforward.go @@ -212,7 +212,7 @@ func (s *Server) Prepare(config *ServerConfig) error { // Log and go on. // // TODO(a.garipov): The Snap problem can probably be solved if - // we add the netlink-coinnector interface plug. + // we add the netlink-connector interface plug. log.Error("cannot initialize ipset: %s", err) } diff --git a/internal/dnsforward/ipset_linux.go b/internal/dnsforward/ipset_linux.go index e88c3986..f74f5503 100644 --- a/internal/dnsforward/ipset_linux.go +++ b/internal/dnsforward/ipset_linux.go @@ -242,6 +242,9 @@ func (c *ipsetCtx) lookupHost(host string) (sets []ipsetProps) { } i = strings.Index(host, ".") + if i == -1 { + break + } } // Check the root catch-all one.