Bug 2219 - SixLowPanNetDevice hangs trying to decode a IPv6 Fragment extension header

This commit is contained in:
Tommaso Pecorella
2015-11-14 23:23:35 +01:00
parent 3a8d1a1bda
commit 7a1e9cfb7f
2 changed files with 6 additions and 1 deletions

View File

@@ -52,6 +52,7 @@ Bugs fixed
- Bug 2207 - Print node ID and time when printing routing tables
- Bug 2206 - Split internet-apps from applications
- Bug 2208 - Interface index based L4 protocols
- Bug 2219 - SixLowPanNetDevice hangs trying to decode a IPv6 Fragment extension header
Known issues
------------

View File

@@ -1406,7 +1406,7 @@ SixLowPanNetDevice::DecompressLowPanNhc (Ptr<Packet> packet, Address const &src,
uint32_t blobSize;
uint8_t blobData[260];
blobSize = encoding.CopyBlob (blobData + 2, 260);
blobSize = encoding.CopyBlob (blobData + 2, 260-2);
uint8_t paddingSize = 0;
uint8_t actualEncodedHeaderType = encoding.GetEid ();
@@ -1525,6 +1525,10 @@ SixLowPanNetDevice::DecompressLowPanNhc (Ptr<Packet> packet, Address const &src,
blobData [0] = encoding.GetNextHeader ();
}
blobData [1] = 0;
blob.AddAtStart (blobSize + 2);
blob.Begin ().Write (blobData, blobSize + 2);
fragHeader.Deserialize (blob.Begin ());
packet->AddHeader (fragHeader);
break;