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/routing-table-pool-entry.cpp b/src/route/routing-table-pool-entry.cpp
index 881b1e3..7e081ae 100644
--- a/src/route/routing-table-pool-entry.cpp
+++ b/src/route/routing-table-pool-entry.cpp
@@ -19,6 +19,7 @@
**/
#include "routing-table-pool-entry.hpp"
+#include "name-prefix-table-entry.hpp"
namespace nlsr {
@@ -28,9 +29,13 @@
os << "RoutingTablePoolEntry("
<< "Destination router: " << rtpe.getDestination()
<< "Next hop list: ";
- for (auto && nh : rtpe.getNexthopList()) {
+ for (const auto& nh : rtpe.getNexthopList()) {
os << nh;
}
+ os << "NamePrefixTableEntries using this entry:";
+ for (const auto& entryPtr : rtpe.namePrefixTableEntries) {
+ os << entryPtr.first << ":";
+ }
return os;
}