--- a/src/aodv/model/aodv-routing-protocol.cc Tue Jun 14 21:16:34 2011 -0700 +++ a/src/aodv/model/aodv-routing-protocol.cc Wed Jun 15 20:57:22 2011 -0700 @@ -873,8 +873,11 @@ ScheduleRreqRetry (dst); if (EnableHello) { - m_htimer.Cancel (); - m_htimer.Schedule (HelloInterval - Time (0.01 * MilliSeconds (UniformVariable ().GetInteger (0, 10)))); + if (!m_htimer.IsRunning ()) + { + m_htimer.Cancel (); + m_htimer.Schedule (HelloInterval - Time (0.01 * MilliSeconds (UniformVariable ().GetInteger (0, 10)))); + } } } @@ -1137,8 +1140,11 @@ if (EnableHello) { - m_htimer.Cancel (); - m_htimer.Schedule (HelloInterval - Time (0.1 * MilliSeconds (UniformVariable ().GetInteger (0, 10)))); + if (!m_htimer.IsRunning ()) + { + m_htimer.Cancel (); + m_htimer.Schedule (HelloInterval - Time (0.1 * MilliSeconds (UniformVariable ().GetInteger (0, 10)))); + } } } @@ -1412,19 +1418,14 @@ std::pair un; while (rerrHeader.RemoveUnDestination (un)) { - if (m_nb.IsNeighbor (un.first)) - SendRerrWhenBreaksLinkToNextHop (un.first); - else - { - for (std::map::const_iterator i = - dstWithNextHopSrc.begin (); i != dstWithNextHopSrc.end (); ++i) - { - if (i->first == un.first) - { - unreachable.insert (un); - } - } - } + for (std::map::const_iterator i = + dstWithNextHopSrc.begin (); i != dstWithNextHopSrc.end (); ++i) + { + if (i->first == un.first) + { + unreachable.insert (un); + } + } } std::vector precursors;