mirror of
https://github.com/daeuniverse/dae.git
synced 2025-03-09 20:30:08 +07:00
fix: potential dns leaking in the very beginning
This commit is contained in:
parent
2525c0658d
commit
203e824ccf
@ -73,6 +73,9 @@ func New(log *logrus.Logger, dns *config.Dns, opt *NewOption) (s *Dns, err error
|
||||
}
|
||||
upstreamName2Id[tag] = uint8(len(s.upstream))
|
||||
s.upstream = append(s.upstream, r)
|
||||
// Init immediately to avoid DNS leaking in the very beginning because param control_plane_dns_routing will
|
||||
// be set in callback.
|
||||
go r.GetUpstream()
|
||||
}
|
||||
// Optimize routings.
|
||||
if dns.Routing.Request.Rules, err = routing.ApplyRulesOptimizers(dns.Routing.Request.Rules,
|
||||
|
Loading…
Reference in New Issue
Block a user