bug 208: must clear flags bits in fragment offset deserialization.
authorMathieu Lacage <mathieu.lacage@sophia.inria.fr>
Wed Jun 04 10:39:36 2008 -0700 (20 months ago)
changeset 32179a72c241348e
parent 3216 b36bb98d766e
child 3218 503c67d93dab
bug 208: must clear flags bits in fragment offset deserialization.
src/node/ipv4-header.cc
     1.1 --- a/src/node/ipv4-header.cc	Wed Jun 04 10:18:57 2008 -0700
     1.2 +++ b/src/node/ipv4-header.cc	Wed Jun 04 10:39:36 2008 -0700
     1.3 @@ -300,9 +300,8 @@
     1.4      {
     1.5        m_flags |= MORE_FRAGMENTS;
     1.6      }
     1.7 -  //XXXX I think we should clear some bits in fragmentOffset !
     1.8    i.Prev ();
     1.9 -  m_fragmentOffset = i.ReadNtohU16 ();
    1.10 +  m_fragmentOffset = i.ReadNtohU16 () & 0xfff8;
    1.11    m_fragmentOffset *= 8;
    1.12    m_ttl = i.ReadU8 ();
    1.13    m_protocol = i.ReadU8 ();