Re: Telling BSD to stop resetting the connection!

2006-01-11 Thread Dan Joumaa
On Jan 11, 2006, at 7:24 PM, David S. Madole wrote: From: "Dan Joumaa" <[EMAIL PROTECTED]> I'm trying to code a software gateway with divert sockets. So far basic things are working, but the net stack constantly resets the connection whenever a SYN-ACK is sent to it.

Telling BSD to stop resetting the connection!

2006-01-11 Thread Dan Joumaa
Hello, I'm trying to code a software gateway with divert sockets. So far basic things are working, but the net stack constantly resets the connection whenever a SYN-ACK is sent to it. 103 9.443254 192.168.1.6 -> 205.166.76.40 TCP pacmand > https [SYN] Seq=0 Ack=0 Win=2920 Len=0 MSS=536 10

Re: Invalid ipfirewall rule?

2006-01-05 Thread Dan Joumaa
On Jan 5, 2006, at 9:57 AM, David Malone wrote: On Wed, Jan 04, 2006 at 05:59:44PM -0700, Dan Joumaa wrote: entry->fw_prot = IPPROTO_TCP|IPPROTO_UDP; This may not be your problem, but I think you need two rules to do this the protocol number is a 8 bit number, not a bit field

Invalid ipfirewall rule?

2006-01-04 Thread Dan Joumaa
I'm trying to set a rule that will divert all TCP/UDP packets from host X to my divert socket. When I try to set the below firewall rule, setsockopt fails and sets errno to EINVAL. Any ideas? entry->version = IP_FW_CURRENT_API_VERSION; entry->fw_src.s_addr = htonl(host); entry->fw_uar.