bug 208: must clear flags bits in fragment offset deserialization.

This commit is contained in:
Mathieu Lacage
2008-06-04 10:39:36 -07:00
parent 10a7924d63
commit 1eb07aeaef

View File

@@ -300,9 +300,8 @@ Ipv4Header::Deserialize (Buffer::Iterator start)
{
m_flags |= MORE_FRAGMENTS;
}
//XXXX I think we should clear some bits in fragmentOffset !
i.Prev ();
m_fragmentOffset = i.ReadNtohU16 ();
m_fragmentOffset = i.ReadNtohU16 () & 0xfff8;
m_fragmentOffset *= 8;
m_ttl = i.ReadU8 ();
m_protocol = i.ReadU8 ();