From bcfcc5a3f455def1a82e6526dd2ea9440d815ea0 Mon Sep 17 00:00:00 2001 From: Tommaso Pecorella Date: Mon, 20 May 2013 22:57:37 +0200 Subject: [PATCH] Better fix for bug 1643 --- src/internet/model/icmpv6-l4-protocol.cc | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/internet/model/icmpv6-l4-protocol.cc b/src/internet/model/icmpv6-l4-protocol.cc index 852cb5559..66d0eb65e 100644 --- a/src/internet/model/icmpv6-l4-protocol.cc +++ b/src/internet/model/icmpv6-l4-protocol.cc @@ -1234,10 +1234,20 @@ bool Icmpv6L4Protocol::Lookup (Ipv6Address dst, Ptr device, PtrLookup (dst); - if (entry && !(entry->IsIncomplete() || entry->IsProbe())) + if (entry) { - *hardwareDestination = entry->GetMacAddress (); - return true; + if (entry->IsReachable () || entry->IsDelay ()) + { + *hardwareDestination = entry->GetMacAddress (); + return true; + } + else if (entry->IsStale ()) + { + entry->StartDelayTimer (); + entry->MarkDelay (); + *hardwareDestination = entry->GetMacAddress (); + return true; + } } } return false;