dnsforward: access ipv6 zone
This commit is contained in:
parent
6f36ebc06c
commit
5e0059b519
|
@ -47,7 +47,7 @@ func processAccessClients(
|
||||||
var ip netip.Addr
|
var ip netip.Addr
|
||||||
var ipnet netip.Prefix
|
var ipnet netip.Prefix
|
||||||
if ip, err = netip.ParseAddr(s); err == nil {
|
if ip, err = netip.ParseAddr(s); err == nil {
|
||||||
ips.Add(ip)
|
ips.Add(ip.WithZone(""))
|
||||||
} else if ipnet, err = netip.ParsePrefix(s); err == nil {
|
} else if ipnet, err = netip.ParsePrefix(s); err == nil {
|
||||||
*nets = append(*nets, ipnet)
|
*nets = append(*nets, ipnet)
|
||||||
} else {
|
} 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
|
// isBlockedIP returns the status of the IP address blocking as well as the rule
|
||||||
// that blocked it.
|
// that blocked it.
|
||||||
func (a *accessManager) isBlockedIP(ip netip.Addr) (blocked bool, rule string) {
|
func (a *accessManager) isBlockedIP(ip netip.Addr) (blocked bool, rule string) {
|
||||||
|
ip = ip.WithZone("")
|
||||||
|
|
||||||
blocked = true
|
blocked = true
|
||||||
ips := a.blockedIPs
|
ips := a.blockedIPs
|
||||||
ipnets := a.blockedNets
|
ipnets := a.blockedNets
|
||||||
|
|
Loading…
Reference in New Issue