diff options
Diffstat (limited to 'sys/netinet/tcp_input.c')
-rw-r--r-- | sys/netinet/tcp_input.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 0e3ffb8cecb8..1e8637982b9a 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)tcp_input.c 8.12 (Berkeley) 5/24/95 - * $Id: tcp_input.c,v 1.86 1999/05/06 18:13:01 peter Exp $ + * $Id: tcp_input.c,v 1.87 1999/07/18 14:42:48 jmb Exp $ */ #include "opt_ipfw.h" /* for ipfw_fwd */ @@ -84,6 +84,10 @@ static int log_in_vain = 0; SYSCTL_INT(_net_inet_tcp, OID_AUTO, log_in_vain, CTLFLAG_RW, &log_in_vain, 0, "Log all incoming TCP connections"); +static int blackhole = 0; +SYSCTL_INT(_net_inet_tcp, OID_AUTO, blackhole, CTLFLAG_RW, + &blackhole, 0, "Do not send RST when dropping refused connections"); + int tcp_delack_enabled = 1; SYSCTL_INT(_net_inet_tcp, OID_AUTO, delayed_ack, CTLFLAG_RW, &tcp_delack_enabled, 0, @@ -404,7 +408,10 @@ findpcb: if (badport_bandlim(1) < 0) goto drop; #endif - goto dropwithreset; + if(blackhole && tiflags & TH_SYN) + goto drop; + else + goto dropwithreset; } tp = intotcpcb(inp); if (tp == 0) |