Bug 867 - Minor bug in Ipv4L3Protocol::Send()
Minor bug in Ipv4L3Protocol::Send()
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: internet
pre-release
All All
: P5 normal
Assigned To: ns-bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-04-08 08:26 EDT by Danqi Wang
Modified: 2010-04-16 18:56 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Danqi Wang 2010-04-08 08:26:57 EDT
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 EDT
changeset:  cdf770714461

thanks!