mgmt: add EndpointId for fib dataset
Refs: #4816
Change-Id: Ic463ac34fca8d9c415e66347dfe642ad01c1ce59
diff --git a/daemon/mgmt/fib-manager.cpp b/daemon/mgmt/fib-manager.cpp
index 1f0d173..531d339 100644
--- a/daemon/mgmt/fib-manager.cpp
+++ b/daemon/mgmt/fib-manager.cpp
@@ -125,6 +125,7 @@
boost::adaptors::transformed([] (const fib::NextHop& nh) {
return ndn::nfd::NextHopRecord()
.setFaceId(nh.getFace().getId())
+ .setEndpointId(nh.getEndpointId())
.setCost(nh.getCost());
});
context.append(ndn::nfd::FibEntry()
diff --git a/tests/daemon/mgmt/fib-manager.t.cpp b/tests/daemon/mgmt/fib-manager.t.cpp
index 0918aaf..7d161ec 100644
--- a/tests/daemon/mgmt/fib-manager.t.cpp
+++ b/tests/daemon/mgmt/fib-manager.t.cpp
@@ -411,7 +411,7 @@
actualPrefixes.insert(prefix);
fib::Entry* fibEntry = m_fib.insert(prefix).first;
fibEntry->addOrUpdateNextHop(*m_faceTable.get(addFace()), 0, std::numeric_limits<uint8_t>::max() - 1);
- fibEntry->addOrUpdateNextHop(*m_faceTable.get(addFace()), 0, std::numeric_limits<uint8_t>::max() - 2);
+ fibEntry->addOrUpdateNextHop(*m_faceTable.get(addFace()), 7, std::numeric_limits<uint8_t>::max() - 2);
}
receiveInterest(Interest("/localhost/nfd/fib/list").setCanBePrefix(true));
@@ -434,6 +434,7 @@
for (const auto& nh : matchedEntry->getNextHops()) {
expectedRecords.back().addNextHopRecord(ndn::nfd::NextHopRecord()
.setFaceId(nh.getFace().getId())
+ .setEndpointId(nh.getEndpointId())
.setCost(nh.getCost()));
}
}