add per-node mac table populated from snmp and arp
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
5
arp.go
5
arp.go
@@ -36,6 +36,8 @@ type arpEntry struct {
|
||||
func (t *Tendrils) readARPTable() {
|
||||
entries := t.parseARPTable()
|
||||
|
||||
localNode := t.getLocalNode()
|
||||
|
||||
for _, entry := range entries {
|
||||
if t.Interface != "" && entry.iface != t.Interface {
|
||||
continue
|
||||
@@ -49,6 +51,9 @@ func (t *Tendrils) readARPTable() {
|
||||
}
|
||||
|
||||
t.nodes.Update(nil, entry.mac, []net.IP{entry.ip}, "", "", "arp")
|
||||
if localNode != nil {
|
||||
t.nodes.UpdateMACTable(localNode, entry.mac, entry.iface)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user