Howto update tcp checksum after modifying IP address
Hi everybody,
I am writing a program which modifies source IP address of packet before writing this packet to tap interface. I face only one problem with tcp checksum. I have current checksum, to get new checksum, I add new source IP address and add one complement of old source IP address. That is, I update checksum with difference of old and new source IP address. It sounds not bad but does not work.
Could anybody help me?
Thank in advance.
Nguyen.
|