diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 6f0923115..e17fcf50f 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -25,6 +25,7 @@ New user-visible features Bugs fixed ---------- - Bug 1930 - Use of invalid reference in OLSR RemoveLinkTuple +- Bug 1932 - NdiscCache entry is not failsafe on double neighbor probing. Known issues ------------ diff --git a/src/internet/model/icmpv6-l4-protocol.cc b/src/internet/model/icmpv6-l4-protocol.cc index 7a634db32..f1b0a3a8e 100644 --- a/src/internet/model/icmpv6-l4-protocol.cc +++ b/src/internet/model/icmpv6-l4-protocol.cc @@ -1340,7 +1340,7 @@ bool Icmpv6L4Protocol::Lookup (Ptr p, Ipv6Address dst, Ptr de *hardwareDestination = entry->GetMacAddress (); return true; } - else /* PROBE */ + else /* INCOMPLETE or PROBE */ { /* queue packet */ entry->AddWaitingPacket (p); diff --git a/src/internet/model/ndisc-cache.cc b/src/internet/model/ndisc-cache.cc index 55cc44272..79b6d313b 100644 --- a/src/internet/model/ndisc-cache.cc +++ b/src/internet/model/ndisc-cache.cc @@ -367,6 +367,10 @@ void NdiscCache::Entry::UpdateLastReachabilityconfirmation () void NdiscCache::Entry::StartReachableTimer () { NS_LOG_FUNCTION_NOARGS (); + if (m_reachableTimer.IsRunning ()) + { + m_reachableTimer.Cancel (); + } m_reachableTimer.SetFunction (&NdiscCache::Entry::FunctionReachableTimeout, this); m_reachableTimer.SetDelay (MilliSeconds (Icmpv6L4Protocol::REACHABLE_TIME)); m_reachableTimer.Schedule (); @@ -381,6 +385,10 @@ void NdiscCache::Entry::StopReachableTimer () void NdiscCache::Entry::StartProbeTimer () { NS_LOG_FUNCTION_NOARGS (); + if (m_probeTimer.IsRunning ()) + { + m_probeTimer.Cancel (); + } m_probeTimer.SetFunction (&NdiscCache::Entry::FunctionProbeTimeout, this); m_probeTimer.SetDelay (MilliSeconds (Icmpv6L4Protocol::RETRANS_TIMER)); m_probeTimer.Schedule (); @@ -397,6 +405,10 @@ void NdiscCache::Entry::StopProbeTimer () void NdiscCache::Entry::StartDelayTimer () { NS_LOG_FUNCTION_NOARGS (); + if (m_delayTimer.IsRunning ()) + { + m_delayTimer.Cancel (); + } m_delayTimer.SetFunction (&NdiscCache::Entry::FunctionDelayTimeout, this); m_delayTimer.SetDelay (Seconds (Icmpv6L4Protocol::DELAY_FIRST_PROBE_TIME)); m_delayTimer.Schedule (); @@ -412,6 +424,10 @@ void NdiscCache::Entry::StopDelayTimer () void NdiscCache::Entry::StartRetransmitTimer () { NS_LOG_FUNCTION_NOARGS (); + if (m_retransTimer.IsRunning ()) + { + m_retransTimer.Cancel (); + } m_retransTimer.SetFunction (&NdiscCache::Entry::FunctionRetransmitTimeout, this); m_retransTimer.SetDelay (MilliSeconds (Icmpv6L4Protocol::RETRANS_TIMER)); m_retransTimer.Schedule ();