internet: (fixes #2440) SocketIpTosTag might be added twice if a packet is sent multiple times

This commit is contained in:
Stefano Avallone
2016-06-15 16:15:56 +02:00
parent e9e80fa69a
commit a2e4d75c84
2 changed files with 3 additions and 1 deletions

View File

@@ -72,6 +72,7 @@ Bugs fixed
- Bug 2436 - SendBlockAckAfterAmpdu is called even if the A-MPDU frame is not addressed to the station
- Bug 2438 - Routing protocols should stop processing packets coming from a non-forwarding interface
- Bug 2439 - SixLowPan Compression kind need to be casted to int in the Print function
- Bug 2440 - SocketIpTosTag might be added twice if a packet is sent multiple times
Known issues
------------

View File

@@ -489,7 +489,8 @@ UdpSocketImpl::DoSendTo (Ptr<Packet> p, Ipv4Address dest, uint16_t port)
{
SocketIpTosTag ipTosTag;
ipTosTag.SetTos (GetIpTos ());
p->AddPacketTag (ipTosTag);
// This packet may already have a SocketIpTosTag (see BUG 2440)
p->ReplacePacketTag (ipTosTag);
}
Ptr<Ipv4> ipv4 = m_node->GetObject<Ipv4> ();