Minh Tran wrote this message on Sat, Aug 06, 2005 at 21:42 +1000:
> I was looking around for the files of Kernel code where SYN messages are sent,
> so we can simply inject some code to send back a reset messages or ignore the 
> SYN requests.

You should probably simply look at ipfw...  you can match outgoing syn
requests with something like:
ipfw add deny ip from any to any out setup

> I am having a bit of trouble in finding out the way of injecting code in the 
> kernel to deal with SYN packets. 
> I am thinking of using ipfw to either reset or drop SYN packets.
> 
> Would anyone have some hints on the clean way of injecting some code to deal 
> with SYN packets 
> or could you give me some ideas on which files i should look at? I really 
> appreciate that.
> I saw some promising files in src/sys/netinet but they are not all clear in 
> my mind.

The file that does the sending of SYN packets is sys/netinet/tcp_output.c
in the function tcp_output...  but I'd highly recommend you look at ipfw
or divert sockets...

-- 
  John-Mark Gurney                              Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to