internal/clientinfo: only do self discover with client id

While at it, also ensure that client info table was initialized before
doing any lookup.
This commit is contained in:
Cuong Manh Le
2023-07-26 18:25:55 +07:00
committed by Cuong Manh Le
parent 72d2f4e7e3
commit 39a2cab051
2 changed files with 24 additions and 2 deletions
+1 -1
View File
@@ -112,7 +112,7 @@ func (p *prog) run() {
go uc.Ping()
}
p.ciTable = clientinfo.NewTable(&cfg, defaultRouteIP())
p.ciTable = clientinfo.NewTable(&cfg, defaultRouteIP(), cdUID)
if leaseFile := p.cfg.Service.DHCPLeaseFile; leaseFile != "" {
mainLog.Load().Debug().Msgf("watching custom lease file: %s", leaseFile)
format := ctrld.LeaseFileFormat(p.cfg.Service.DHCPLeaseFileFormat)