route: updates to name prefixes are more efficent.
With this change, only entries that have changed next-hops will
cause any change in the name prefix table. Consequently, routing
table calculations no longer cause RIB registrations for unchanged
prefixes. However, this is not a problem because FIB entries
refresh themselves. This resulted in the removal of a test from the
TestNlsr suite.
refs: #2864
Change-Id: If28a04cb7bb47a3a6c32cd24578c68885d08d6b3
diff --git a/src/route/name-prefix-table-entry.cpp b/src/route/name-prefix-table-entry.cpp
index d9f8c65..298a2ef 100644
--- a/src/route/name-prefix-table-entry.cpp
+++ b/src/route/name-prefix-table-entry.cpp
@@ -50,6 +50,8 @@
if (iterator != m_rteList.end()) {
(*iterator)->decrementUseCount();
+ // Remove this NamePrefixEntry from the RoutingTablePoolEntry
+ (*iterator)->namePrefixTableEntries.erase(getNamePrefix());
m_rteList.erase(iterator);
}
else {