Fixed TTL
This commit is contained in:
@@ -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 ())
|
||||
|
||||
@@ -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 ())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user