internal/clientinfo: implement ndp listen

So when new clients join the network, ctrld can really the event and
update client information to NDP table quickly.
This commit is contained in:
Cuong Manh Le
2024-01-22 23:10:00 +07:00
committed by Cuong Manh Le
parent 0a6d9d4454
commit 51b235b61a
4 changed files with 102 additions and 0 deletions
+6
View File
@@ -209,6 +209,12 @@ func (t *Table) init() {
t.refreshers = append(t.refreshers, discover)
}
}
ctx, cancel := context.WithCancel(context.Background())
go func() {
<-t.quitCh
cancel()
}()
go t.ndp.listen(ctx)
}
// PTR lookup.
if t.discoverPTR() {