NAT and UDP checksum
Kevin Moore
kevinm@sigware.com
Wed, 9 Feb 2000 12:26:17 -0800
I have a NAT filter which changes a port number in the data stream of a UDP
packet. The data is also encrypted. So I decrypt it, change the port and
encrypt it again. This worked fine under ipchains as a masq module. I
didn't need to update any checksums. Apparently with netfilter I need to
update the UDP checksum because the destination machine rejects the UDP
packet as bad. What is the appropriate function for recomputing the
checksum? I've tried many of them but I'm not clear as I never had to do
this before. Because of the encryption the data for the packet from the
embedded port number on has effectively changed.
Kevin