Pull request: aghnet: fix adding entry into multiple ipsets

Updates #3638.

Squashed commit of the following:

commit f9c52176806051c2e3d5e34a440a919ca022c319
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Wed Sep 22 14:31:46 2021 +0300

    aghnet: fix docs

commit 1167806d73ba14d0145a2d1e11cece5dbb7958aa
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Wed Sep 22 14:26:28 2021 +0300

    all: imp docs, names

commit ba08f5c759fe4d83a4709f619fa65dffe3e9e164
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Wed Sep 22 14:14:05 2021 +0300

    aghnet: fix adding entry into multiple ipsets
This commit is contained in:
Ainar Garipov
2021-09-22 14:37:40 +03:00
parent b1242ee93f
commit e1e064db59
5 changed files with 31 additions and 12 deletions

View File

@@ -131,7 +131,7 @@ func (c *ipsetCtx) process(dctx *dnsContext) (rc resultCode) {
return resultCodeSuccess
}
log.Debug("ipset: added %d new ips", n)
log.Debug("ipset: added %d new ipset entries", n)
return resultCodeSuccess
}

View File

@@ -15,7 +15,7 @@ type fakeIpsetMgr struct {
ip6s []net.IP
}
// Add implements the aghnet.IpsetManager inteface for *fakeIpsetMgr.
// Add implements the aghnet.IpsetManager interface for *fakeIpsetMgr.
func (m *fakeIpsetMgr) Add(host string, ip4s, ip6s []net.IP) (n int, err error) {
m.ip4s = append(m.ip4s, ip4s...)
m.ip6s = append(m.ip6s, ip6s...)