Bugzilla – Bug 651
Ipv4StaticRouting doesn't work stand-alone: can't deliver local packets
Last modified: 2009-10-02 00:58:06 EDT
After a while trying to understand why the packets targeted at a specific ns3::Node were being looped, I found the following comment in src/routing/static-routing/ipv4-static-routing.cc: // XXX this method not robust enough to work outside of ListRouting context // because it will not perform local delivery bool Ipv4StaticRouting::RouteInput (Ptr<const Packet> p, const Ipv4Header &ipHeader, Ptr<const NetDevice> idev, UnicastForwardCallback ucb, MulticastForwardCallback mcb, LocalDeliverCallback lcb, ErrorCallback ecb) When I wrapped the Ipv4StaticRouting with ns3::Ipv4ListRouting, it started to work. I think either the code should not allow to have static routing without list routing, or the static routing should be fixed. Regards, Martín.
(In reply to comment #0) > After a while trying to understand why the packets targeted at a specific > ns3::Node were being looped, I found the following comment in > src/routing/static-routing/ipv4-static-routing.cc: > > // XXX this method not robust enough to work outside of ListRouting context > // because it will not perform local delivery > bool > Ipv4StaticRouting::RouteInput (Ptr<const Packet> p, const Ipv4Header > &ipHeader, Ptr<const NetDevice> idev, > UnicastForwardCallback ucb, > MulticastForwardCallback mcb, > LocalDeliverCallback lcb, ErrorCallback ecb) > > When I wrapped the Ipv4StaticRouting with ns3::Ipv4ListRouting, it started to > work. I think either the code should not allow to have static routing without > list routing, or the static routing should be fixed. > Note that this is also true of OLSR and GlobalRouting. I haven't tried to solve this yet, but I would like to try to see whether we can just copy over the needed methods from ListRouting to these other protocols.
changeset 54b51a1105d6 I tested this with Ipv4StaticRouting and Ipv4GlobalRouting (removing the ListRouting object). I made the same change for Ipv6StaticRouting but it is not tested due to lack of an example for multi-hop routing. NixVector and OLSR still need to operate in a ListRouting context. Suggest to work such extensions after ns-3.6, if there is interest (patches welcome).