You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem Description:On a simple NFD-connected topology, after a prefix is withdrawn using nlsrc withdraw , all routing information for that prefix on adjacent NFDs is removed.
Cause of the problem: NLSR calculates routing information according to LSDB, forms FIB table, specifically: prefix+NextHops (faceID, cost), and registers routing information to NFD through Interest-Data, where the formal parameters of register() method are prefix, faceURI, Cost, and The formal parameters of the unregister() method are prefix, faceURI, and Cost, and the formal parameters of the unregister() method are prefix, faceURI, so it can be assumed that when NLSR registers the route with NFD, it registers all the route information under a certain prefix.
Solution: Modify void Fib::update(const ndn::Name& name, const NexthopList& allHops) in the fib.cpp file in the NLSR-0.4.3\src\route directory(In fact every version of NLSR has this problem, version 0.4.3 has been tested)The code is modified as follows:
// Get the max possible faces which is the minumum of the configuration setting and
// the length of the list of all next hops.
unsigned int maxFaces = getNumberOfFacesForName(allHops);
NexthopList hopsToAdd;
unsigned int nFaces = 0;
// Create a list of next hops to be installed with length == maxFaces
for (NexthopList::iterator it = allHops.cbegin(); it != allHops.cend() && nFaces < maxFaces;
++it, ++nFaces) {
hopsToAdd.addNextHop(*it);
}
Problem Description:On a simple NFD-connected topology, after a prefix is withdrawn using nlsrc withdraw , all routing information for that prefix on adjacent NFDs is removed.
Cause of the problem: NLSR calculates routing information according to LSDB, forms FIB table, specifically: prefix+NextHops (faceID, cost), and registers routing information to NFD through Interest-Data, where the formal parameters of register() method are prefix, faceURI, Cost, and The formal parameters of the unregister() method are prefix, faceURI, and Cost, and the formal parameters of the unregister() method are prefix, faceURI, so it can be assumed that when NLSR registers the route with NFD, it registers all the route information under a certain prefix.
Solution: Modify void Fib::update(const ndn::Name& name, const NexthopList& allHops) in the fib.cpp file in the NLSR-0.4.3\src\route directory(In fact every version of NLSR has this problem, version 0.4.3 has been tested)The code is modified as follows:
`void Fib::update(const ndn::Name& name, const NexthopList& allHops)
{
NLSR_LOG_DEBUG("Fib::update called");
// Get the max possible faces which is the minumum of the configuration setting and
// the length of the list of all next hops.
unsigned int maxFaces = getNumberOfFacesForName(allHops);
NexthopList hopsToAdd;
unsigned int nFaces = 0;
// Create a list of next hops to be installed with length == maxFaces
for (NexthopList::iterator it = allHops.cbegin(); it != allHops.cend() && nFaces < maxFaces;
++it, ++nFaces) {
hopsToAdd.addNextHop(*it);
}
std::map<ndn::Name, FibEntry>::iterator entryIt = m_table.find(name);
// New FIB entry that has nextHops
if (entryIt == m_table.end() && hopsToAdd.size() != 0) {
NLSR_LOG_DEBUG("New FIB Entry");
}
// Existing FIB entry that may or may not have nextHops
else {
// Existing FIB entry
NLSR_LOG_DEBUG("Existing FIB Entry");
}
if (entryIt != m_table.end() && !entryIt->second.getRefreshEventId()) {
scheduleEntryRefresh(entryIt->second,
[this] (FibEntry& entry) {
scheduleLoop(entry);
});
}
}
The text was updated successfully, but these errors were encountered: