From ef7e07f86b716ddb0d731209d5b62eaf2b7912dd Mon Sep 17 00:00:00 2001 From: Kirill Andreev Date: Tue, 2 Jun 2009 10:44:31 +0400 Subject: [PATCH] Fixed TTL --- src/devices/mesh/dot11s/hwmp-mac-plugin.cc | 2 +- src/devices/mesh/dot11s/hwmp-protocol.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/devices/mesh/dot11s/hwmp-mac-plugin.cc b/src/devices/mesh/dot11s/hwmp-mac-plugin.cc index d30c2d88d..bbc723a0a 100644 --- a/src/devices/mesh/dot11s/hwmp-mac-plugin.cc +++ b/src/devices/mesh/dot11s/hwmp-mac-plugin.cc @@ -80,7 +80,7 @@ HwmpMacPlugin::Receive (Ptr 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 ()) diff --git a/src/devices/mesh/dot11s/hwmp-protocol.cc b/src/devices/mesh/dot11s/hwmp-protocol.cc index e6b0a6f64..5467498e7 100644 --- a/src/devices/mesh/dot11s/hwmp-protocol.cc +++ b/src/devices/mesh/dot11s/hwmp-protocol.cc @@ -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 ()) {