From df209c99bdbddcfbbeec42a1372fd861a25add9d Mon Sep 17 00:00:00 2001 From: Dimitry Kolyshev Date: Thu, 18 May 2023 14:11:01 +0300 Subject: [PATCH] dnsforward: allowed clients private nets --- internal/dnsforward/access.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/dnsforward/access.go b/internal/dnsforward/access.go index f340ec3e..e3c50933 100644 --- a/internal/dnsforward/access.go +++ b/internal/dnsforward/access.go @@ -152,7 +152,7 @@ func (a *accessManager) isBlockedHost(host string, qt rules.RRType) (ok bool) { // isBlockedIP returns the status of the IP address blocking as well as the // rule that blocked it. Addresses from private nets are always allowed. func (a *accessManager) isBlockedIP(ip netip.Addr) (blocked bool, rule string) { - if a.privateNets.Contains(ip.AsSlice()) { + if a.privateNets != nil && a.privateNets.Contains(ip.AsSlice()) { return false, "" }