diff --git a/src/devices/mesh/dot11s/hwmp-protocol.cc b/src/devices/mesh/dot11s/hwmp-protocol.cc index a231e2f03..e6b0a6f64 100644 --- a/src/devices/mesh/dot11s/hwmp-protocol.cc +++ b/src/devices/mesh/dot11s/hwmp-protocol.cc @@ -220,7 +220,10 @@ HwmpProtocol::RequestRoute ( return false; } if (tag.GetTtl () == 0) + { + m_stats.droppedTtl ++; return false; + } tag.DecrementTtl (); } if (destination == Mac48Address::GetBroadcast ()) @@ -945,6 +948,7 @@ void HwmpProtocol::Statistics::Print (std::ostream & os) const "txUnicast=\"" << txUnicast << "\" " "txBroadcast=\"" << txBroadcast << "\" " "txBytes=\"" << txBytes / 1024 << "K\" " + "droppedTtl=\"" << droppedTtl << "\" " "totalQueued=\"" << totalQueued << "\" " "totalDropped=\"" << totalDropped << "\"/>\n"; } diff --git a/src/devices/mesh/dot11s/hwmp-protocol.h b/src/devices/mesh/dot11s/hwmp-protocol.h index 5b7de27db..662900382 100644 --- a/src/devices/mesh/dot11s/hwmp-protocol.h +++ b/src/devices/mesh/dot11s/hwmp-protocol.h @@ -145,11 +145,12 @@ private: uint16_t txUnicast; uint16_t txBroadcast; uint32_t txBytes; + uint16_t droppedTtl; uint16_t totalQueued; uint16_t totalDropped; void Print (std::ostream & os) const; - Statistics () : txUnicast (0), txBroadcast (0), txBytes (0), totalQueued (0), totalDropped (0) {} + Statistics () : txUnicast (0), txBroadcast (0), txBytes (0), droppedTtl (0), totalQueued (0), totalDropped (0) {} }; Statistics m_stats; ///\}