Hi again,
first thanks for filing this.
I could fix it for me by just cancelling the ARP request if no route for
a node exists (i also played with the ArpCache
settings like Kevin proposed and could avoid the problem, but i think
this was only compensating for semi-working links,
not really fixing the cause):
--- a/src/internet-stack/arp-l3-protocol.cc Wed Nov 11 00:27:47 2009
+0300
+++ b/src/internet-stack/arp-l3-protocol.cc Wed Dec 02 16:04:07 2009
+0100
@@ -323,7 +323,7 @@
Socket::SocketErrno errno_;
Ptr<Packet> packet = Create<Packet> ();
Ptr<Ipv4Route> route = ipv4->GetRoutingProtocol ()->RouteOutput
(packet, header, interface, errno_);
- NS_ASSERT (route != 0);
+ if(route == 0) return;
NS_LOG_LOGIC ("ARP: sending request from node "<<m_node->GetId ()<<
" || src: " << cache->GetDevice ()->GetAddress () <<
" / " << route->GetSource () <<
But i doubt that this is a clean solution and don't know about the
consequences for other existing code, but i am also not sure how it
could be handled better.
What i'm wondering about is how the arp request comes off at all. If
there is no route to a destination anymore, TCP should not try to send
packets to it (which it still seems to do because of the ARP request),
shouldn't it fail with no route or reset the connection ?
I thought about a concurrency issue, but i think it is very unlikely
that the route is there when a packet over TCP needs to get
sent/forwarded and is just removed by OLSR before the SendArpRequest is
issued, the time window should be very small or even be zero in the
simulation..
The second thing that made me thinking is the comment in SendArpRequest:
// need to pick a source address; use routing implementation to select
The route determination in the SendArpRequest function is only needed to
set the source address for the arp request... but couldn't/shouldn't the
arp
protocol work indepently of routing knowledge, and isn't the source
address already fixed by the device the arp request is sent over (and
could be retrieved from there)?
Source to produce the situation is attached, sorry if not everything
makes sense in there, but i quickly stripped it down as far as i could ;)
Regards, Bj�rn