ndn_routing_helper: fix overwriting of existing prefixes
Instead of overwriting the existing prefixes, the prefixes given
in `prefix` are now appended to the list of already existing
prefixes.
Change-Id: I300f72ab8b0d2688a3379f295499a6ffdcbb54a4
diff --git a/minindn/helpers/ndn_routing_helper.py b/minindn/helpers/ndn_routing_helper.py
index 38d841a..0fb4b33 100644
--- a/minindn/helpers/ndn_routing_helper.py
+++ b/minindn/helpers/ndn_routing_helper.py
@@ -305,7 +305,9 @@
:param Nodes nodes: List of nodes from net object
"""
for node in nodes:
- self.namePrefixes[node.name] = prefix
+ if not node.name in self.namePrefixes:
+ self.namePrefixes[node.name] = []
+ self.namePrefixes[node.name] += prefix
def calculateNPossibleRoutes(self, nFaces=0):
"""