cmd/cli: add loop guard for LAN/PTR queries

This commit is contained in:
Cuong Manh Le
2023-12-05 20:24:12 +07:00
committed by Cuong Manh Le
parent af2c1c87e0
commit 0bb51aa71d
5 changed files with 87 additions and 1 deletions
+2
View File
@@ -69,6 +69,8 @@ func Test_prog_upstreamFor(t *testing.T) {
cfg := testhelper.SampleConfig(t)
p := &prog{cfg: cfg}
p.um = newUpstreamMonitor(p.cfg)
p.lanLoopGuard = newLoopGuard()
p.ptrLoopGuard = newLoopGuard()
for _, nc := range p.cfg.Network {
for _, cidr := range nc.Cidrs {
_, ipNet, err := net.ParseCIDR(cidr)