a problem with tcp checksum
"Jee J.Z." <[email protected]> Mon, 31 May 2004 00:48:02 +0100
| Newsgroups | gmane.comp.security.libnet |
|---|---|
| Message-ID | <00a201c446a0$8bc769f0$68892090@grouse> |
Hi all, I am going frustrated since a wired problem with tcp checksum seem to always happen. ;-( I really wish to see somebody throw some light on it. The situation is as follows: I am trying to inject TCP packets using libnet_build_tcp_options(), libnet_build_tcp() and libnet_build_ipv4() (checksum automatically built). When TCP payload size is odd in byte, the tcp checksum is always incorrect (using ethereal to capture injected packets and check them); while if TCP payload size is even in byte, everything seems working very well. What I wish to know is do I need to manually change some parameters of libnet_build_tcp_options(), libnet_build_tcp() or libnet_build_ipv4() when the tcp payload size is odd in byte, in order to let libnet compute tcp checksum correctly? If not, what shall I do to fix the problem? I am looking forward to your help. Thank you very much in advance! Regards, Jee