diff --git a/src/aodv/model/aodv-neighbor.cc b/src/aodv/model/aodv-neighbor.cc index 4599a0c..090d596 100644 --- a/src/aodv/model/aodv-neighbor.cc +++ b/src/aodv/model/aodv-neighbor.cc @@ -149,7 +149,7 @@ Neighbors::LookupMacAddress (Ipv4Address addr) i != m_arp.end (); ++i) { ArpCache::Entry * entry = (*i)->Lookup (addr); - if (entry != 0 && entry->IsAlive () && !entry->IsExpired ()) + if (entry != 0 && (entry->IsAlive () || entry->IsPermanent ()) && !entry->IsExpired ()) { hwaddr = Mac48Address::ConvertFrom (entry->GetMacAddress ()); break; diff --git a/src/dsr/model/dsr-rcache.cc b/src/dsr/model/dsr-rcache.cc index f9e26af..979a288 100644 --- a/src/dsr/model/dsr-rcache.cc +++ b/src/dsr/model/dsr-rcache.cc @@ -1222,7 +1222,7 @@ RouteCache::LookupMacAddress (Ipv4Address addr) i != m_arp.end (); ++i) { ArpCache::Entry * entry = (*i)->Lookup (addr); - if (entry != 0 && entry->IsAlive () && !entry->IsExpired ()) + if (entry != 0 && (entry->IsAlive () || entry->IsPermanent ()) && !entry->IsExpired ()) { hwaddr = Mac48Address::ConvertFrom (entry->GetMacAddress ()); break;