summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2001-03-19 22:09:00 +0000
committerdes <des@FreeBSD.org>2001-03-19 22:09:00 +0000
commit9dc769bc1bca28b499e95d46faad989ed5995ca9 (patch)
tree76711b02e5125a82db3e7bc96e97e6a7eb1dbb58
parent097a9d6bae16257ca039fa6a77f1c9a2b8adbc26 (diff)
downloadFreeBSD-src-9dc769bc1bca28b499e95d46faad989ed5995ca9.zip
FreeBSD-src-9dc769bc1bca28b499e95d46faad989ed5995ca9.tar.gz
Axe TCP_RESTRICT_RST. It was never a particularly good idea except for a few
very specific scenarios, and now that we have had net.inet.tcp.blackhole for quite some time there is really no reason to use it any more. (last of three commits)
-rw-r--r--sys/netinet/tcp_input.c13
-rw-r--r--sys/netinet/tcp_reass.c13
2 files changed, 2 insertions, 24 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c
index 49cbdee..6c7ae76 100644
--- a/sys/netinet/tcp_input.c
+++ b/sys/netinet/tcp_input.c
@@ -132,12 +132,6 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, drop_synfin, CTLFLAG_RW,
&drop_synfin, 0, "Drop TCP packets with SYN+FIN set");
#endif
-#ifdef TCP_RESTRICT_RST
-static int restrict_rst = 0;
-SYSCTL_INT(_net_inet_tcp, OID_AUTO, restrict_rst, CTLFLAG_RW,
- &restrict_rst, 0, "Restrict RST emission");
-#endif
-
struct inpcbhead tcb;
#define tcb6 tcb /* for KAME src sync over BSD*'s */
struct inpcbinfo tcbinfo;
@@ -2303,13 +2297,8 @@ dropwithreset:
/* IPv6 anycast check is done at tcp6_input() */
/*
- * Perform bandwidth limiting (and RST blocking
- * if kernel is so configured.)
+ * Perform bandwidth limiting.
*/
-#ifdef TCP_RESTRICT_RST
- if (restrict_rst)
- goto drop;
-#endif
if (badport_bandlim(rstreason) < 0)
goto drop;
diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c
index 49cbdee..6c7ae76 100644
--- a/sys/netinet/tcp_reass.c
+++ b/sys/netinet/tcp_reass.c
@@ -132,12 +132,6 @@ SYSCTL_INT(_net_inet_tcp, OID_AUTO, drop_synfin, CTLFLAG_RW,
&drop_synfin, 0, "Drop TCP packets with SYN+FIN set");
#endif
-#ifdef TCP_RESTRICT_RST
-static int restrict_rst = 0;
-SYSCTL_INT(_net_inet_tcp, OID_AUTO, restrict_rst, CTLFLAG_RW,
- &restrict_rst, 0, "Restrict RST emission");
-#endif
-
struct inpcbhead tcb;
#define tcb6 tcb /* for KAME src sync over BSD*'s */
struct inpcbinfo tcbinfo;
@@ -2303,13 +2297,8 @@ dropwithreset:
/* IPv6 anycast check is done at tcp6_input() */
/*
- * Perform bandwidth limiting (and RST blocking
- * if kernel is so configured.)
+ * Perform bandwidth limiting.
*/
-#ifdef TCP_RESTRICT_RST
- if (restrict_rst)
- goto drop;
-#endif
if (badport_bandlim(rstreason) < 0)
goto drop;
OpenPOWER on IntegriCloud