--- a/src/internet-stack/ipv4-l3-protocol.cc Fri Apr 16 16:06:14 2010 -0700
+++ b/src/internet-stack/ipv4-l3-protocol.cc Fri Apr 16 16:06:55 2010 -0700
@@ -598,7 +598,7 @@
return;
}
// 4) packet is not broadcast, and is passed in with a route entry but route->GetGateway is not set (e.g., on-demand)
- if (route && route->GetGateway () != Ipv4Address ())
+ if (route && route->GetGateway () == Ipv4Address ())
{
// This could arise because the synchronous RouteOutput() call
// returned to the transport protocol with a source address but
--- a/src/routing/static-routing/ipv4-static-routing.cc Fri Apr 16 16:06:14 2010 -0700
+++ b/src/routing/static-routing/ipv4-static-routing.cc Fri Apr 16 16:06:55 2010 -0700
@@ -608,7 +608,8 @@
for (uint32_t j = 0; j < m_ipv4->GetNAddresses (i); j++)
{
if (m_ipv4->GetAddress (i,j).GetLocal () != Ipv4Address () &&
- m_ipv4->GetAddress (i,j).GetMask () != Ipv4Mask ())
+ m_ipv4->GetAddress (i,j).GetMask () != Ipv4Mask () &&
+ m_ipv4->GetAddress (i,j).GetMask () != Ipv4Mask::GetOnes())
{
AddNetworkRouteTo (m_ipv4->GetAddress (i,j).GetLocal ().CombineMask (m_ipv4->GetAddress (i,j).GetMask ()),
m_ipv4->GetAddress (i,j).GetMask (), i);