View | Details | Raw Unified | Return to bug 2401
Collapse All | Expand All

(-)i/src/internet/model/tcp-header.cc (+3 lines)
 Lines 359-364   TcpHeader::Serialize (Buffer::Iterator start) const Link Here 
359
uint32_t
359
uint32_t
360
TcpHeader::Deserialize (Buffer::Iterator start)
360
TcpHeader::Deserialize (Buffer::Iterator start)
361
{
361
{
362
  m_optionsLen = 0;
362
  Buffer::Iterator i = start;
363
  Buffer::Iterator i = start;
363
  m_sourcePort = i.ReadNtohU16 ();
364
  m_sourcePort = i.ReadNtohU16 ();
364
  m_destinationPort = i.ReadNtohU16 ();
365
  m_destinationPort = i.ReadNtohU16 ();
 Lines 404-409   TcpHeader::Deserialize (Buffer::Iterator start) Link Here 
404
          optionLen -= optionSize;
405
          optionLen -= optionSize;
405
          i.Next (optionSize);
406
          i.Next (optionSize);
406
          m_options.push_back (op);
407
          m_options.push_back (op);
408
          m_optionsLen += optionSize;
407
        }
409
        }
408
      else
410
      else
409
        {
411
        {
 Lines 417-422   TcpHeader::Deserialize (Buffer::Iterator start) Link Here 
417
              // Discard padding bytes without adding to option list
419
              // Discard padding bytes without adding to option list
418
              i.Next (1);
420
              i.Next (1);
419
              --optionLen;
421
              --optionLen;
422
              ++m_optionsLen;
420
            }
423
            }
421
        }
424
        }
422
    }
425
    }
(-)i/src/internet/test/tcp-header-test.cc (+2 lines)
 Lines 309-314   TcpHeaderWithRFC793OptionTestCase::OneOptionAtTime () Link Here 
309
    dest.Deserialize (buffer.Begin ());
309
    dest.Deserialize (buffer.Begin ());
310
    NS_TEST_ASSERT_MSG_EQ (header.HasOption (TcpOption::MSS),
310
    NS_TEST_ASSERT_MSG_EQ (header.HasOption (TcpOption::MSS),
311
                           true, "MSS option not correctly serialized");
311
                           true, "MSS option not correctly serialized");
312
    NS_TEST_ASSERT_MSG_EQ (header.GetOptionLength (), oMSS.GetSerializedSize (),
313
                           "MSS Option not counted in the total");
312
  }
314
  }
313
}
315
}
314
316

Return to bug 2401