Re: tcp checksum
Frédéric Raynal <[email protected]> Thu, 27 May 2004 22:36:35 +0200
| Newsgroups | gmane.comp.security.libnet |
|---|---|
| Message-ID | <[email protected]> |
Re, On Thu, May 27, 2004 at 06:19:10PM +0100, Jee J.Z. wrote: > > Thank you for your reply. Yes, I didn't call enough functions before > libnet_write(). I used to use only libnet_build_tcp() and then > libnet_build_ipv4(), however, I missed libnet_build_tcp_options(), because > the packets I captured and wish to reinject include 8-byte tcp header > option. And I figured out the proper sequence of using these functions are: > libnet_build_tcp_options()->libnet_build_tcp()->libnet_build_ipv4()->libnet_ > write(); otherwise things would happen weird. Seems ok :) > On the other hand, are there any relatively complete tutorials on the newest > version libnet? I never found one, and many instructions on web are still > for old versions and therefore are somewhat misleading. I never came across > libnet_build_tcp_options() until looked into the source codes at > libnet_build_tcp.c, and I never knew the sequence of using these "build" > functions until I tried it, which is clearly hard for a new user to grasp > libnet. Anybody has the same problem? <adv> http://www.security-labs.org/index.php3?page=libnet </adv> The build function is very logical as it is excactly the same as the one used by your system: you start from the higher layer (eg dns), and go down the the lower ones (eth for instance). > Amit, what do you think it happens when a packet with a dst address of > another machine is injected into the kernel? Will it hit the POST routing > hook? I am asking this because my SNAT on POSTROUTING seems invalid to my > injected packets. What do you think? Look at a thread called "icmp redirect at layer 3" started by Alberto Ornaghi: we explore the travel of a packet through the Linux kernel. However, we still havent found the solution to Alberto's problem. BTW, do I have a problem with my browser or hav the archives on securityfocus for the latest weeks disappeared ? Fred