savannah-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Savannah-users] Problem with TCP input checksum


From: Niklas Molin
Subject: [Savannah-users] Problem with TCP input checksum
Date: Tue, 8 Jun 2010 01:37:43 +0200

Hi.

I'm trying to get the TCP connection working and have some problem with the checksum of the incoming TCP packet, in the tcp_input function.
I'm starting a connection and the processor sends out the first message (which is okay).
The receiver send a reply message, but it's only 58 bytes long (so the message is padded with 2 bytes).
So when my code comes to the tcp_input function, my tot_len (in pbuf) is 2 bytes more than the TCP length. This causes the checksum calculation to return an error.
I fixed the code to only use the TCP header and payload length when calling the checksum calculation function, and then it works.

Is this something someone else has seen or did I do something wrong when I calculated the tot_len in the pbuf?

Thanks,
Niklas



Hotmail: Free, trusted and rich email service. Get it now.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]