Fix IP deduplication and filter link interfaces in JSON

This commit is contained in:
Ian Gulliver
2026-01-25 09:53:31 -08:00
parent 3a33ece7d9
commit 4c149ecdf7
3 changed files with 45 additions and 1 deletions

View File

@@ -308,6 +308,10 @@ func (n *Nodes) updateNodeInterface(node *Node, nodeID int, mac net.HardwareAddr
}
iface.IPs.Add(ip)
n.ipIndex[ipKey] = nodeID
if ipOnlyIface, exists := node.Interfaces[ipKey]; exists && ipOnlyIface != iface {
delete(node.Interfaces, ipKey)
}
}
return added