From 5e0059b5199466ea88b246d1fc27563fc71af6d3 Mon Sep 17 00:00:00 2001 From: Stanislav Chzhen Date: Wed, 10 Apr 2024 16:59:37 +0300 Subject: [PATCH] dnsforward: access ipv6 zone --- internal/dnsforward/access.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/dnsforward/access.go b/internal/dnsforward/access.go index c4d6c5913ca..e7d7959f40a 100644 --- a/internal/dnsforward/access.go +++ b/internal/dnsforward/access.go @@ -47,7 +47,7 @@ func processAccessClients( var ip netip.Addr var ipnet netip.Prefix if ip, err = netip.ParseAddr(s); err == nil { - ips.Add(ip) + ips.Add(ip.WithZone("")) } else if ipnet, err = netip.ParsePrefix(s); err == nil { *nets = append(*nets, ipnet) } else { @@ -140,6 +140,8 @@ 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. func (a *accessManager) isBlockedIP(ip netip.Addr) (blocked bool, rule string) { + ip = ip.WithZone("") + blocked = true ips := a.blockedIPs ipnets := a.blockedNets