diff options
author | guido <guido@FreeBSD.org> | 1998-05-04 17:59:52 +0000 |
---|---|---|
committer | guido <guido@FreeBSD.org> | 1998-05-04 17:59:52 +0000 |
commit | 8d0d7f7ab41653923f0912b232de3189fe28d1ed (patch) | |
tree | e024c4c2e5e2b492ef4e8dd2631fdda77e276f07 | |
parent | 2fe6b18abad7dd8f31c852eb5e2e7b938c6e3bd6 (diff) | |
download | FreeBSD-src-8d0d7f7ab41653923f0912b232de3189fe28d1ed.zip FreeBSD-src-8d0d7f7ab41653923f0912b232de3189fe28d1ed.tar.gz |
Refuse accellerated opens on listening sockets that have not set
the TCP_NOPUSH socket option.
This disables TAO for those services that do not know about T/TCP.
Reviewed by: Garrett Wollman
Submitted by: Peter Wemm
-rw-r--r-- | sys/netinet/tcp_input.c | 6 | ||||
-rw-r--r-- | sys/netinet/tcp_reass.c | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index eb6c3ad..2519ac3 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.73 1998/04/17 22:36:59 des Exp $ + * $Id: tcp_input.c,v 1.74 1998/04/24 10:08:57 dg Exp $ */ #include "opt_tcpdebug.h" @@ -680,7 +680,9 @@ findpcb: * - otherwise do a normal 3-way handshake. */ if ((to.to_flag & TOF_CC) != 0) { - if (taop->tao_cc != 0 && CC_GT(to.to_cc, taop->tao_cc)) { + if (tp->t_state & TF_NOPUSH && + taop->tao_cc != 0 && CC_GT(to.to_cc, taop->tao_cc)) { + taop->tao_cc = to.to_cc; tp->t_state = TCPS_ESTABLISHED; diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c index eb6c3ad..2519ac3 100644 --- a/sys/netinet/tcp_reass.c +++ b/sys/netinet/tcp_reass.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)tcp_input.c 8.12 (Berkeley) 5/24/95 - * $Id: tcp_input.c,v 1.73 1998/04/17 22:36:59 des Exp $ + * $Id: tcp_input.c,v 1.74 1998/04/24 10:08:57 dg Exp $ */ #include "opt_tcpdebug.h" @@ -680,7 +680,9 @@ findpcb: * - otherwise do a normal 3-way handshake. */ if ((to.to_flag & TOF_CC) != 0) { - if (taop->tao_cc != 0 && CC_GT(to.to_cc, taop->tao_cc)) { + if (tp->t_state & TF_NOPUSH && + taop->tao_cc != 0 && CC_GT(to.to_cc, taop->tao_cc)) { + taop->tao_cc = to.to_cc; tp->t_state = TCPS_ESTABLISHED; |