[BUGFIX] gateways and nexthop (ignore null address)

This commit is contained in:
Martin Geno 2018-01-21 20:39:36 +01:00
parent 0c4e17406d
commit 9d3eb127aa
No known key found for this signature in database
GPG Key ID: F0D39A37E925E941

View File

@ -184,6 +184,9 @@ func (nodes *Nodes) readIfaces(nodeinfo *data.NodeInfo) {
} }
for _, mac := range addresses { for _, mac := range addresses {
if mac == "" {
continue
}
if oldNodeID, _ := nodes.ifaceToNodeID[mac]; oldNodeID != nodeID { if oldNodeID, _ := nodes.ifaceToNodeID[mac]; oldNodeID != nodeID {
if oldNodeID != "" { if oldNodeID != "" {
log.Printf("override nodeID from %s to %s on MAC address %s", oldNodeID, nodeID, mac) log.Printf("override nodeID from %s to %s on MAC address %s", oldNodeID, nodeID, mac)