TCP checksum may actually be computed in hardware, so that the value you see in the packet may not be the final checksum value. Which NIC are you using? You can use ethtool to check whether it has TCP offload capabilities. Elad Gaurav Aggarwal wrote:
Hi All, I wrote a program where I am using the nfnetlink and netfilter_queue model to capture the packet. After that I just change the destination address of the packet and insert it back into the ip stack. Now instead of calculating the TCP checksum from scratch, I was just recalculating it by using incremental update mechanism as mentioned in RFC 1624. Good thing is that I was able to get the correct IP header checksum but packet's TCP checksum value is corrupted. Interesting thing is, the difference in checksum is exactly the same as that of difference in original and modified packet header. What I mean to say is that I was changing the destination IP from "10.102.35.22" to "10.102.35.24" and the difference in tcp checksum (expected and computed) is coming as 0x02. Attached is the source code and tcpdump. Any help will be really appreciated.
-- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ