Deserialize bugfix

This commit is contained in:
Kirill Andreev
2009-03-18 15:22:58 +03:00
parent 99f082e652
commit 7f78a7e423

View File

@@ -118,6 +118,13 @@ IeDot11sPeerManagement::DeserializeInformation (Buffer::Iterator start, uint8_t
{
Buffer::Iterator i = start;
m_subtype = i.ReadU8();
m_length = length;
if (m_subtype == PEER_OPEN)
NS_ASSERT(length == 3);
if (m_subtype == PEER_CONFIRM)
NS_ASSERT(length == 5);
if (m_subtype == PEER_CLOSE)
NS_ASSERT(length == 7);
m_localLinkId = i.ReadNtohU16();
if (m_length > 3)
m_peerLinkId = i.ReadNtohU16();