As I said earlier both the ack no and seq no are adjusted correctly. Neways I got it to resolve the checksum error but couldnt understand the reason behind it.
Case 1: When I dont see the checksum error I do the following.
1.
I dont compute TCP checksum in xmit_hook after adjusting the sequence number.
2. I do compute TCP checksum in recv_hook after adjusting the acknowledgement number.
3. The TCP checksum offload is disabled by the following command (#ethtool --offload eth0 rx off tx off)
Case 2: When I see the checksum error I do the following.
1.
I do compute TCP checksum in xmit_hook after adjusting the sequence number.
2. I do compute TCP checksum in recv_hook after adjusting the acknowledgement number.
3. The TCP checksum offload is disabled by the following command (#ethtool --offload eth0 rx off tx off)
As per my understanding Case 1 should fail while Case 2 should pass but its behaving exactly opposite to what I think
What am I missing here?
In Case 1 When I dont explicitly calculate the checksum and when I turn off the Checksum offload calculation I expect the HTTP communication failure but instead I see HTTP communication happening correctly and checksum is also calculated correctly (by the hardware?). But why does this happen when I have turned off? And why does case 2 fails?
Any thoughts please!!!