[Ns-bugs] [Bug 247] Checksum calculation crashes tcp-large-transfer

bugzilla-daemon@nsnam-www.ece.gatech.edu bugzilla-daemon at nsnam-www.ece.gatech.edu
Wed Jul 2 08:58:08 PDT 2008


http://www.nsnam.org/bugzilla/show_bug.cgi?id=247





------- Comment #3 from mathieu.lacage at sophia.inria.fr  2008-07-02 11:58 -------
(In reply to comment #2)
> (In reply to comment #1)
> > Created an attachment (id=192)
 --> (http://www.nsnam.org/bugzilla/attachment.cgi?id=192&action=view) [details] [details]
> > Fix TCP checksum crash
> > 
> > Here a patch to fix checksum crash with TCP.
> > 
> > In TcpHeader::Deserialize, we calulate the checksum and we need the payload
> > size and the previous checksum from the pseudo-header (calculating by
> > TcpHeader::InitializeChecksum).
> 
> How do know the size of the tcp header before reading it (there could well be
> tcp options in the header)? I realize that we do the same thing for the Udp
> Header in UdpL4Protocol::Receive but that is not right.
> 
> I have to confess that it is not clear to me what we should do here. An option
> might be to add a Buffer::Iterator::GetSize method (pick a better name, please)
> and use that instead of setting and using the m_payloadSize member.

Another option, again, for TCP only, would be to change the signature of the
InitializeChecksum method to take an extra argument, the size of the complete
packet such that, in Deserialize, you could do the right thing without using
m_payloadSize.

In either case, we should work harder to document the relatively subtle
behavior of the TcpHeader, UdpHeader, and , Ipv4Header classes.


-- 
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the Ns-bugs mailing list