From 04ef3bf88d686b0e00a2fc8da2ffd788b49cb54c Mon Sep 17 00:00:00 2001 From: mycroft Date: Sat, 19 Sep 1998 04:32:51 +0000 Subject: If we're in LISTEN state and all of RST, SYN and ACK are clear, send a RST. --- sys/netinet/tcp_input.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 2b8be2e8526..d3a4f6cd0c7 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -1,4 +1,4 @@ -/* $NetBSD: tcp_input.c,v 1.65 1998/09/10 10:46:59 mouse Exp $ */ +/* $NetBSD: tcp_input.c,v 1.66 1998/09/19 04:32:51 mycroft Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -618,7 +618,14 @@ findpcb: tiwin <<= tp->snd_scale; goto after_listen; } - } + } else { + /* + * None of RST, SYN or ACK was set. + * This is an invalid packet for a + * TCB in LISTEN state. Send a RST. + */ + goto badsyn; + } } else { /* * Received a SYN. -- cgit