Bug 867

Summary: Minor bug in Ipv4L3Protocol::Send()
Product: ns-3 Reporter: Danqi Wang <beyondwdq>
Component: internetAssignee: ns-bugs <ns-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: tomh
Priority: P5    
Version: pre-release   
Hardware: All   
OS: All   

Description Danqi Wang 2010-04-08 08:26:57 UTC
ns-3 version: The latest ns-3-dev version at the time I post this message.
File: src/internet_stack/ipv4-l3-protocol.cc
in function:
void
Ipv4L3Protocol::Send (Ptr<Packet> packet,
           Ipv4Address source,
           Ipv4Address destination,
           uint8_t protocol,
           Ptr<Ipv4Route> route)

Line:601
 if (route && route->GetGateway () != Ipv4Address ())

Description:
According to the comments, I think this line should be
 if (route && route->GetGateway () == Ipv4Address ())

The comments are:
 // 4) packet is not broadcast, and is passed in with a route entry
but route->GetGateway is not set (e.g., on-demand)

However, currently this may not matter too much, since this condition
is not implemented.
Comment 1 Tom Henderson 2010-04-16 18:56:26 UTC
changeset:  cdf770714461

thanks!