Skip to content

Commit

Permalink
Pull request 2121: 6584-stats-non-anonymized-ips
Browse files Browse the repository at this point in the history
Squashed commit of the following:

commit 4767b7b
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date:   Wed Dec 27 14:30:10 2023 +0300

    all: fix non-anonymized ips in stats
  • Loading branch information
schzhn committed Dec 27, 2023
1 parent d75712b commit b42063e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -58,6 +58,7 @@ NOTE: Add new changes BELOW THIS COMMENT.

### Fixed

- Non-anonymized IP addresses on the dashboard ([#6584]).
- Maximum cache TTL requirement when editing minimum cache TTL in the Web UI
([#6409]).
- Load balancing algorithm stuck on a single server ([#6480]).
Expand All @@ -74,6 +75,7 @@ NOTE: Add new changes BELOW THIS COMMENT.
[#6534]: https://github.com/AdguardTeam/AdGuardHome/issues/6534
[#6541]: https://github.com/AdguardTeam/AdGuardHome/issues/6541
[#6545]: https://github.com/AdguardTeam/AdGuardHome/issues/6545
[#6584]: https://github.com/AdguardTeam/AdGuardHome/issues/6584

<!--
NOTE: Add new changes ABOVE THIS COMMENT.
Expand Down
4 changes: 2 additions & 2 deletions internal/dnsforward/stats.go
Expand Up @@ -25,10 +25,10 @@ func (s *Server) processQueryLogsAndStats(dctx *dnsContext) (rc resultCode) {

ip := pctx.Addr.Addr().AsSlice()
s.anonymizer.Load()(ip)
ipStr := net.IP(ip).String()

log.Debug("dnsforward: client ip for stats and querylog: %s", ip)
log.Debug("dnsforward: client ip for stats and querylog: %s", ipStr)

ipStr := pctx.Addr.Addr().String()
ids := []string{ipStr, dctx.clientID}
qt, cl := q.Qtype, q.Qclass

Expand Down

0 comments on commit b42063e

Please sign in to comment.