--- a/src/routing/olsr/olsr-routing-protocol.cc Fri Apr 17 12:33:17 2009 -0700
+++ b/src/routing/olsr/olsr-routing-protocol.cc Fri Apr 17 15:10:23 2009 -0700
@@ -2591,7 +2591,7 @@
}
bool
-RoutingProtocol::RequestIfIndex (Ipv4Address destination,
+RoutingProtocol::RequestInterface (Ipv4Address destination,
uint32_t& ifIndex)
{
RoutingTableEntry entry1, entry2;
@@ -2653,10 +2653,13 @@
RoutingTableEntry entry;
for (uint32_t i = 0; i < m_ipv4->GetNInterfaces (); i++)
{
- if (m_ipv4->GetAddress (i) == interfaceAddress)
+ for (uint32_t j = 0; j < m_ipv4->GetNAddresses (i); j++)
{
- AddEntry (dest, next, i, distance);
- return;
+ if (m_ipv4->GetAddress (i,j).GetLocal () == interfaceAddress)
+ {
+ AddEntry (dest, next, i, distance);
+ return;
+ }
}
}
NS_ASSERT (false); // should not be reached
--- a/src/routing/olsr/olsr-routing-protocol.h Fri Apr 17 12:33:17 2009 -0700
+++ b/src/routing/olsr/olsr-routing-protocol.h Fri Apr 17 15:10:23 2009 -0700
@@ -125,7 +125,7 @@
const Ipv4Header &ipHeader,
Ptr<Packet> packet,
RouteReplyCallback routeReply);
- virtual bool RequestIfIndex (Ipv4Address destination,
+ virtual bool RequestInterface (Ipv4Address destination,
uint32_t& ifIndex);