Bug 1937 - FlowMonitor fails to track multiplexed packets

This commit is contained in:
Tommaso Pecorella
2014-06-27 22:28:07 +02:00
parent aa3a17d3e5
commit 16671aa50d
3 changed files with 11 additions and 30 deletions

View File

@@ -27,6 +27,7 @@ Bugs fixed
- Bug 1921 - Icmpv6L4Protocol::ForgeEchoRequest returns a malformed packet
- Bug 1930 - Use of invalid reference in OLSR RemoveLinkTuple
- Bug 1932 - NdiscCache entry is not failsafe on double neighbor probing.
- Bug 1937 - FlowMonitor fails to track multiplexed packets
Known issues
------------

View File

@@ -260,17 +260,15 @@ Ipv4FlowProbe::SendOutgoingLogger (const Ipv4Header &ipHeader, Ptr<const Packet>
// tag the packet with the flow id and packet id, so that the packet can be identified even
// when Ipv4Header is not accessible at some non-IPv4 protocol layer
Ipv4FlowProbeTag fTag (flowId, packetId, size);
ipPayload->AddPacketTag (fTag);
ipPayload->AddByteTag (fTag);
}
}
void
Ipv4FlowProbe::ForwardLogger (const Ipv4Header &ipHeader, Ptr<const Packet> ipPayload, uint32_t interface)
{
// peek the tags that are added by Ipv4FlowProbe::SendOutgoingLogger ()
Ipv4FlowProbeTag fTag;
bool found = ipPayload->PeekPacketTag (fTag);
bool found = ipPayload->FindFirstMatchingByteTag (fTag);
if (found)
{
@@ -286,11 +284,8 @@ Ipv4FlowProbe::ForwardLogger (const Ipv4Header &ipHeader, Ptr<const Packet> ipPa
void
Ipv4FlowProbe::ForwardUpLogger (const Ipv4Header &ipHeader, Ptr<const Packet> ipPayload, uint32_t interface)
{
// remove the tags that are added by Ipv4FlowProbe::SendOutgoingLogger ()
Ipv4FlowProbeTag fTag;
// ConstCast: see http://www.nsnam.org/bugzilla/show_bug.cgi?id=904
bool found = ConstCast<Packet> (ipPayload)->RemovePacketTag (fTag);
bool found = ipPayload->FindFirstMatchingByteTag (fTag);
if (found)
{
@@ -325,11 +320,8 @@ Ipv4FlowProbe::DropLogger (const Ipv4Header &ipHeader, Ptr<const Packet> ipPaylo
}
#endif
// remove the tags that are added by Ipv4FlowProbe::SendOutgoingLogger ()
Ipv4FlowProbeTag fTag;
// ConstCast: see http://www.nsnam.org/bugzilla/show_bug.cgi?id=904
bool found = ConstCast<Packet> (ipPayload)->RemovePacketTag (fTag);
bool found = ipPayload->FindFirstMatchingByteTag (fTag);
if (found)
{
@@ -383,11 +375,9 @@ Ipv4FlowProbe::DropLogger (const Ipv4Header &ipHeader, Ptr<const Packet> ipPaylo
void
Ipv4FlowProbe::QueueDropLogger (Ptr<const Packet> ipPayload)
{
// remove the tags that are added by Ipv4FlowProbe::SendOutgoingLogger ()
Ipv4FlowProbeTag fTag;
bool tagFound = ipPayload->FindFirstMatchingByteTag (fTag);
// ConstCast: see http://www.nsnam.org/bugzilla/show_bug.cgi?id=904
bool tagFound = ConstCast<Packet> (ipPayload)->RemovePacketTag (fTag);
if (!tagFound)
{
return;

View File

@@ -254,17 +254,15 @@ Ipv6FlowProbe::SendOutgoingLogger (const Ipv6Header &ipHeader, Ptr<const Packet>
// tag the packet with the flow id and packet id, so that the packet can be identified even
// when Ipv6Header is not accessible at some non-IPv6 protocol layer
Ipv6FlowProbeTag fTag (flowId, packetId, size);
ipPayload->AddPacketTag (fTag);
ipPayload->AddByteTag (fTag);
}
}
void
Ipv6FlowProbe::ForwardLogger (const Ipv6Header &ipHeader, Ptr<const Packet> ipPayload, uint32_t interface)
{
// peek the tags that are added by Ipv6FlowProbe::SendOutgoingLogger ()
Ipv6FlowProbeTag fTag;
bool found = ipPayload->PeekPacketTag (fTag);
bool found = ipPayload->FindFirstMatchingByteTag (fTag);
if (found)
{
@@ -280,11 +278,8 @@ Ipv6FlowProbe::ForwardLogger (const Ipv6Header &ipHeader, Ptr<const Packet> ipPa
void
Ipv6FlowProbe::ForwardUpLogger (const Ipv6Header &ipHeader, Ptr<const Packet> ipPayload, uint32_t interface)
{
// remove the tags that are added by Ipv6FlowProbe::SendOutgoingLogger ()
Ipv6FlowProbeTag fTag;
// ConstCast: see http://www.nsnam.org/bugzilla/show_bug.cgi?id=904
bool found = ConstCast<Packet> (ipPayload)->RemovePacketTag (fTag);
bool found = ipPayload->FindFirstMatchingByteTag (fTag);
if (found)
{
@@ -319,11 +314,8 @@ Ipv6FlowProbe::DropLogger (const Ipv6Header &ipHeader, Ptr<const Packet> ipPaylo
}
#endif
// remove the tags that are added by Ipv6FlowProbe::SendOutgoingLogger ()
Ipv6FlowProbeTag fTag;
// ConstCast: see http://www.nsnam.org/bugzilla/show_bug.cgi?id=904
bool found = ConstCast<Packet> (ipPayload)->RemovePacketTag (fTag);
bool found = ipPayload->FindFirstMatchingByteTag (fTag);
if (found)
{
@@ -384,11 +376,9 @@ Ipv6FlowProbe::DropLogger (const Ipv6Header &ipHeader, Ptr<const Packet> ipPaylo
void
Ipv6FlowProbe::QueueDropLogger (Ptr<const Packet> ipPayload)
{
// remove the tags that are added by Ipv6FlowProbe::SendOutgoingLogger ()
Ipv6FlowProbeTag fTag;
bool tagFound = ipPayload->FindFirstMatchingByteTag (fTag);
// ConstCast: see http://www.nsnam.org/bugzilla/show_bug.cgi?id=904
bool tagFound = ConstCast<Packet> (ipPayload)->RemovePacketTag (fTag);
if (!tagFound)
{
return;