Repair two critical bug with Interest/NACK processing
- There was wrong selection of FIB face order in CcnxForwardingStrategy
- Stop reacting on NACK if there are no incoming faces (i.e., loop
detected after interest is already satisfied)
diff --git a/model/ccnx-flooding-strategy.cc b/model/ccnx-flooding-strategy.cc
index f2add5f..4a8dd50 100644
--- a/model/ccnx-flooding-strategy.cc
+++ b/model/ccnx-flooding-strategy.cc
@@ -67,19 +67,25 @@
return true;
// boo... :(
-
int propagatedCount = 0;
BOOST_FOREACH (const CcnxFibFaceMetric &metricFace, pitEntry.m_fibEntry.m_faces.get<i_metric> ())
{
+ NS_LOG_DEBUG ("Trying " << boost::cref(metricFace));
if (metricFace.m_status == CcnxFibFaceMetric::NDN_FIB_RED) // all non-read faces are in front
break;
if (metricFace.m_face == incomingFace)
- continue; // same face as incoming, don't forward
+ {
+ NS_LOG_DEBUG ("continue (same as incoming)");
+ continue; // same face as incoming, don't forward
+ }
if (pitEntry.m_incoming.find (metricFace.m_face) != pitEntry.m_incoming.end ())
- continue; // don't forward to face that we received interest from
+ {
+ NS_LOG_DEBUG ("continue (same as previous incoming)");
+ continue; // don't forward to face that we received interest from
+ }
CcnxPitEntryOutgoingFaceContainer::type::iterator outgoing =
pitEntry.m_outgoing.find (metricFace.m_face);
@@ -87,8 +93,10 @@
if (outgoing != pitEntry.m_outgoing.end () &&
outgoing->m_retxCount >= pitEntry.m_maxRetxCount)
{
+ NS_LOG_DEBUG ("continue (same as previous outgoing)");
continue; // already forwarded before during this retransmission cycle
}
+ NS_LOG_DEBUG ("max retx count: " << pitEntry.m_maxRetxCount);
bool faceAvailable = metricFace.m_face->IsBelowLimit ();
if (!faceAvailable) // huh...