Skip to content

Commit

Permalink
dnsforward: access ipv6 zone
Browse files Browse the repository at this point in the history
  • Loading branch information
schzhn committed Apr 10, 2024
1 parent 6f36ebc commit 5e0059b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/dnsforward/access.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5e0059b

Please sign in to comment.