I'm currently writing a netfilter module to modify some options in TCP packets. Currently, I'm just trying to learn a bit about it so I've written a module that 1) Sets the PSH flag in all TCP packets and 2) Modifies the destination address to be the source address.
I wrote a small function that uses tcp_v4_check() and ip_fast_csum() to recalculate the checksums on the packets. If I set the PSH flag, it works great. All of my packets have it set and everything works as normal. However, if I try to modify the destination address to the source address, I can send out SYNs, but I never get SYN/ACKs back from the remote machine (myself). So, I have a couple questions: 1) Do I really need my own function to wrap around those other two checksum functions or is there already a wrapper-type function to do this? 2) How can I fix the problem with setting the destination address to the source address? Is there some option or flag I'm missing? Thanks in advance. Jeff Shipman - CCD Sandia National Laboratories (505) 844-1158 / MS-1372