fib: add EndpointId field in NextHop record
refs: #4284
Change-Id: If0cfc21cfa81d6fa3c1590ecdce8fbbc1ea95e13
diff --git a/daemon/fw/access-strategy.cpp b/daemon/fw/access-strategy.cpp
index 8460a00..31e2b91 100644
--- a/daemon/fw/access-strategy.cpp
+++ b/daemon/fw/access-strategy.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2018, Regents of the University of California,
+ * Copyright (c) 2014-2019, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -137,7 +137,7 @@
}
Face* outFace = this->getFace(mi.lastNexthop);
- if (outFace == nullptr || !fibEntry.hasNextHop(*outFace)) {
+ if (outFace == nullptr || !fibEntry.hasNextHop(*outFace, 0)) {
NFD_LOG_DEBUG(pitEntry->getInterest() << " last-nexthop-gone");
return false;
}
diff --git a/daemon/fw/ncc-strategy.cpp b/daemon/fw/ncc-strategy.cpp
index 0f7f4e1..bb96009 100644
--- a/daemon/fw/ncc-strategy.cpp
+++ b/daemon/fw/ncc-strategy.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2018, Regents of the University of California,
+ * Copyright (c) 2014-2019, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -81,7 +81,7 @@
size_t nUpstreams = nexthops.size();
shared_ptr<Face> bestFace = meInfo.getBestFace();
- if (bestFace != nullptr && fibEntry.hasNextHop(*bestFace) &&
+ if (bestFace != nullptr && fibEntry.hasNextHop(*bestFace, 0) &&
!wouldViolateScope(inFace, interest, *bestFace) &&
canForwardToLegacy(*pitEntry, *bestFace)) {
// TODO Should we use `randlow = 100 + nrand48(h->seed) % 4096U;` ?
@@ -111,7 +111,7 @@
}
shared_ptr<Face> previousFace = meInfo.previousFace.lock();
- if (previousFace != nullptr && fibEntry.hasNextHop(*previousFace) &&
+ if (previousFace != nullptr && fibEntry.hasNextHop(*previousFace, 0) &&
!wouldViolateScope(inFace, interest, *previousFace) &&
canForwardToLegacy(*pitEntry, *previousFace)) {
--nUpstreams;
@@ -157,7 +157,7 @@
MeasurementsEntryInfo& meInfo = this->getMeasurementsEntryInfo(pitEntry);
shared_ptr<Face> previousFace = meInfo.previousFace.lock();
- if (previousFace != nullptr && fibEntry.hasNextHop(*previousFace) &&
+ if (previousFace != nullptr && fibEntry.hasNextHop(*previousFace, 0) &&
!wouldViolateScope(*inFace, interest, *previousFace) &&
canForwardToLegacy(*pitEntry, *previousFace)) {
this->sendInterest(pitEntry, *previousFace, interest);