fib: fix route unregister bug during update
refs: #5179
Change-Id: I19952ebcb0c78c405f3d820694a7b0f1cf7a3fe6
diff --git a/src/route/fib.hpp b/src/route/fib.hpp
index e8f8a40..25b5956 100644
--- a/src/route/fib.hpp
+++ b/src/route/fib.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2020, The University of Memphis,
+ * Copyright (c) 2014-2021, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@@ -31,11 +31,13 @@
namespace nlsr {
+typedef NexthopListT<NextHopUriSortedComparator> NextHopsUriSortedSet;
+
struct FibEntry {
ndn::Name name;
ndn::scheduler::ScopedEventId refreshEventId;
int32_t seqNo = 1;
- NexthopList nexthopList;
+ NextHopsUriSortedSet nexthopSet;
};
typedef std::function<void(FibEntry&)> afterRefreshCallback;
@@ -153,7 +155,7 @@
* \sa Fib::removeOldNextHopsFromFibEntryAndNfd
*/
void
- addNextHopsToFibEntryAndNfd(FibEntry& entry, const NexthopList& hopsToAdd);
+ addNextHopsToFibEntryAndNfd(FibEntry& entry, const NextHopsUriSortedSet& hopsToAdd);
unsigned int
getNumberOfFacesForName(const NexthopList& nextHopList);