diff --git a/src/aodv/model/aodv-routing-protocol.cc b/src/aodv/model/aodv-routing-protocol.cc index bcb0df7c9..c6f362216 100644 --- a/src/aodv/model/aodv-routing-protocol.cc +++ b/src/aodv/model/aodv-routing-protocol.cc @@ -1418,19 +1418,14 @@ RoutingProtocol::RecvError (Ptr p, Ipv4Address src ) 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;