Default TTL of IPv4 broadcast datagrams changed from 1 to 64
This commit is contained in:
@@ -60,6 +60,9 @@ by the ns-3 logging system to report the execution context of each log line.
|
||||
<li><b>Object::DoStart</b>: Users who need to complete their object setup at the start of a simulation
|
||||
can override this virtual method, perform their adhoc setup, and then, must chain up to their parent.
|
||||
</ul>
|
||||
<ul>
|
||||
<li> Default TTL of IPv4 broadcast datagrams changed from 1 to 64.
|
||||
</ul>
|
||||
|
||||
<h2>Changes to existing API:</h2>
|
||||
<ul>
|
||||
|
||||
@@ -406,6 +406,7 @@ Ipv4L3Protocol::Receive( Ptr<NetDevice> device, Ptr<const Packet> p, uint16_t pr
|
||||
|
||||
for (SocketList::iterator i = m_sockets.begin (); i != m_sockets.end (); ++i)
|
||||
{
|
||||
NS_LOG_LOGIC ("Forwarding to raw socket");
|
||||
Ptr<Ipv4RawSocketImpl> socket = *i;
|
||||
socket->ForwardUp (packet, ipHeader, device);
|
||||
}
|
||||
@@ -469,7 +470,6 @@ Ipv4L3Protocol::Send (Ptr<Packet> packet,
|
||||
if (destination.IsBroadcast ())
|
||||
{
|
||||
NS_LOG_LOGIC ("Ipv4L3Protocol::Send case 1: limited broadcast");
|
||||
ttl = 1;
|
||||
ipHeader = BuildHeader (source, destination, protocol, packet->GetSize (), ttl, mayFragment);
|
||||
uint32_t ifaceIndex = 0;
|
||||
for (Ipv4InterfaceList::iterator ifaceIter = m_interfaces.begin ();
|
||||
@@ -502,7 +502,6 @@ Ipv4L3Protocol::Send (Ptr<Packet> packet,
|
||||
destination.CombineMask (ifAddr.GetMask ()) == ifAddr.GetLocal ().CombineMask (ifAddr.GetMask ()) )
|
||||
{
|
||||
NS_LOG_LOGIC ("Ipv4L3Protocol::Send case 2: subnet directed bcast to " << ifAddr.GetLocal ());
|
||||
ttl = 1;
|
||||
ipHeader = BuildHeader (source, destination, protocol, packet->GetSize (), ttl, mayFragment);
|
||||
Ptr<Packet> packetCopy = packet->Copy ();
|
||||
m_sendOutgoingTrace (ipHeader, packetCopy, ifaceIndex);
|
||||
|
||||
Reference in New Issue
Block a user