ForwardingStrategy removes PIT if interest wasn't propagated. Updated
Limits interface (adding config options). Small randomization for decay
frequency in PerFibLimits strategy.
diff --git a/model/fw/ndn-forwarding-strategy.cc b/model/fw/ndn-forwarding-strategy.cc
index cf09878..913448f 100644
--- a/model/fw/ndn-forwarding-strategy.cc
+++ b/model/fw/ndn-forwarding-strategy.cc
@@ -244,12 +244,24 @@
void
ForwardingStrategy::DidExhaustForwardingOptions (const Ptr<Face> &incomingFace,
- Ptr<InterestHeader> header,
- const Ptr<const Packet> &packet,
- Ptr<pit::Entry> pitEntry)
+ Ptr<InterestHeader> header,
+ const Ptr<const Packet> &packet,
+ Ptr<pit::Entry> pitEntry)
{
NS_LOG_FUNCTION (this << boost::cref (*incomingFace));
- m_dropInterests (header, incomingFace);
+ if (pitEntry->GetOutgoing ().size () == 0)
+ {
+ m_dropInterests (header, incomingFace);
+
+ // All incoming interests cannot be satisfied. Remove them
+ pitEntry->ClearIncoming ();
+
+ // Remove also outgoing
+ pitEntry->ClearOutgoing ();
+
+ // Set pruning timout on PIT entry (instead of deleting the record)
+ m_pit->MarkErased (pitEntry);
+ }
}
void