Pull request 2201: 6192-access-ipv6-zone

Updates #6192.

Squashed commit of the following:

commit e98c2f0fff0d617bff36f1bb583b1a95fe3a1af9
Merge: 4dd9218d4 6f7d5cc4b
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Tue Apr 16 17:24:38 2024 +0300

    Merge branch 'master' into 6192-access-ipv6-zone

commit 4dd9218d4eee5918c152ca768f5a0a5ed19bfa6f
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Tue Apr 16 16:12:24 2024 +0300

    all: upd chlog

commit e126e12f70
Merge: d57c34c51 201ac73cf
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Tue Apr 16 14:34:45 2024 +0300

    Merge branch 'master' into 6192-access-ipv6-zone

commit d57c34c51d
Merge: decb768d3 df7f19eb8
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Mon Apr 15 16:26:57 2024 +0300

    Merge branch 'master' into 6192-access-ipv6-zone

commit decb768d3b
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Thu Apr 11 17:06:54 2024 +0300

    all: upd chlog

commit c8184bef8f
Merge: 5e0059b51 ff7c715c5
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Thu Apr 11 16:52:10 2024 +0300

    Merge branch 'master' into 6192-access-ipv6-zone

commit 5e0059b519
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Wed Apr 10 16:59:37 2024 +0300

    dnsforward: access ipv6 zone
This commit is contained in:
Stanislav Chzhen 2024-04-16 17:33:34 +03:00
parent 6f7d5cc4be
commit 48c6242a7b
2 changed files with 7 additions and 1 deletions

View File

@ -29,6 +29,8 @@ NOTE: Add new changes BELOW THIS COMMENT.
### Fixed
- Support for link-local subnets, i.e. `fe80::/16`, in the access settings
([#6192]).
- The ability to apply an invalid configuration for private RDNS, which led to
server inoperability.
- Ignoring query log for clients with ClientID set ([#5812]).
@ -40,6 +42,7 @@ NOTE: Add new changes BELOW THIS COMMENT.
[#5345]: https://github.com/AdguardTeam/AdGuardHome/issues/5345
[#5812]: https://github.com/AdguardTeam/AdGuardHome/issues/5812
[#6192]: https://github.com/AdguardTeam/AdGuardHome/issues/6192
[#6854]: https://github.com/AdguardTeam/AdGuardHome/issues/6854
[#6875]: https://github.com/AdguardTeam/AdGuardHome/issues/6875

View File

@ -156,7 +156,10 @@ func (a *accessManager) isBlockedIP(ip netip.Addr) (blocked bool, rule string) {
}
for _, ipnet := range ipnets {
if ipnet.Contains(ip) {
// Remove zone before checking because prefixes stip zones.
//
// TODO(d.kolyshev): Cover with tests.
if ipnet.Contains(ip.WithZone("")) {
return blocked, ipnet.String()
}
}