Fixed TTL

This commit is contained in:
Kirill Andreev
2009-06-02 10:44:31 +04:00
parent 2ca7f6c030
commit ef7e07f86b
2 changed files with 3 additions and 3 deletions

View File

@@ -80,7 +80,7 @@ HwmpMacPlugin::Receive (Ptr<Packet> packet, const WifiMacHeader & header)
NS_ASSERT(false);
return false;
}
tag.SetTtl (meshHdr.GetMeshTtl () - 1);
tag.SetTtl (meshHdr.GetMeshTtl ());
if(m_protocol->GetAddress() != destination)
packet->AddPacketTag(tag);
if (destination == Mac48Address::GetBroadcast ())

View File

@@ -210,7 +210,7 @@ HwmpProtocol::RequestRoute (
//Filling TAG:
if(destination == Mac48Address::GetBroadcast ())
tag.SetSeqno (m_dataSeqno++);
tag.SetTtl (m_maxTtl+1);
tag.SetTtl (m_maxTtl);
}
else
{
@@ -219,12 +219,12 @@ HwmpProtocol::RequestRoute (
NS_ASSERT(false);
return false;
}
tag.DecrementTtl ();
if (tag.GetTtl () == 0)
{
m_stats.droppedTtl ++;
return false;
}
tag.DecrementTtl ();
}
if (destination == Mac48Address::GetBroadcast ())
{