Name prefix table entries keep pointers instead of keeping a copy of the object for routing table entries.
refs: #2863
Change-Id: I3271c9f96dfc8721a0ca7c900542c6ddb0b321ac
diff --git a/src/route/nexthop.cpp b/src/route/nexthop.cpp
index 0274b9d..8de2f27 100644
--- a/src/route/nexthop.cpp
+++ b/src/route/nexthop.cpp
@@ -24,6 +24,14 @@
namespace nlsr {
+bool
+operator==(const NextHop& lhs, const NextHop& rhs)
+{
+ return ((lhs.getRouteCostAsAdjustedInteger() == rhs.getRouteCostAsAdjustedInteger())
+ &&
+ (lhs.getConnectingFaceUri() == rhs.getConnectingFaceUri()));
+}
+
std::ostream&
operator<<(std::ostream& os, const NextHop& hop)
{