From b9ae64f643bf68437430aaabd092f6b61d4c9401 Mon Sep 17 00:00:00 2001 From: Pavel 'LEdoian' Turinsky Date: Mon, 10 Jul 2023 10:46:57 +0200 Subject: [PATCH] Add all the networks in a vertex to the index in VertexFinder. --- birdvisu/topo_v3.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/birdvisu/topo_v3.py b/birdvisu/topo_v3.py index add1604..f11e59f 100644 --- a/birdvisu/topo_v3.py +++ b/birdvisu/topo_v3.py @@ -269,9 +269,13 @@ class VertexFinder: self.topologies.append(topo) for v in topo.vertices: id = v.id - self.vertices[id].add(topo) + self.vertices[id].append(topo) # Add to various "indices" - self.by_addr[id.address].add(id) + if isinstance(id.address, tuple): + for addr in id.address: + self.by_addr[addr].add(id) + else: + self.by_addr[id.address].add(id) self.by_rid[id.router_id].add(id) self.by_dr[id.dr_id].add(id) self.by_discriminator[id.discriminator].add(id)