Default TTL of IPv4 broadcast datagrams changed from 1 to 64

This commit is contained in:
Pavel Boyko
2009-11-14 08:48:35 -08:00
parent 51a25721af
commit ffd8e7fc18
2 changed files with 4 additions and 2 deletions

View File

@@ -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);