diff options
author | fenner <fenner@FreeBSD.org> | 1997-09-30 16:38:09 +0000 |
---|---|---|
committer | fenner <fenner@FreeBSD.org> | 1997-09-30 16:38:09 +0000 |
commit | e71cc90452001066c1efbeb7f81f12b988d33dfc (patch) | |
tree | af4149fce5efe5ad055d93de050c63caab6a5ef6 | |
parent | 90766df182817292e743a7616c78bf084575cb9e (diff) | |
download | FreeBSD-src-e71cc90452001066c1efbeb7f81f12b988d33dfc.zip FreeBSD-src-e71cc90452001066c1efbeb7f81f12b988d33dfc.tar.gz |
Don't consider a SYN/ACK with CC but no CCECHO a proper T/TCP
handshake.
Reviewed by: Rich Stevens <rstevens@kohala.com>
-rw-r--r-- | sys/netinet/tcp_input.c | 20 | ||||
-rw-r--r-- | sys/netinet/tcp_reass.c | 20 |
2 files changed, 22 insertions, 18 deletions
diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 1b9f755..fc4afec 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.60 1997/08/16 19:15:39 wollman Exp $ + * $Id: tcp_input.c,v 1.61 1997/09/16 18:36:05 joerg Exp $ */ #include "opt_tcpdebug.h" @@ -808,15 +808,17 @@ findpcb: * option, check it to make sure this segment really * matches our SYN. If not, just drop it as old * duplicate, but send an RST if we're still playing - * by the old rules. + * by the old rules. If no CC.ECHO option, make sure + * we don't get fooled into using T/TCP. */ - if ((to.to_flag & TOF_CCECHO) && - tp->cc_send != to.to_ccecho) { - if (taop->tao_ccsent != 0) - goto drop; - else - goto dropwithreset; - } + if (to.to_flag & TOF_CCECHO) { + if (tp->cc_send != to.to_ccecho) + if (taop->tao_ccsent != 0) + goto drop; + else + goto dropwithreset; + } else + tp->t_flags &= ~TF_RCVD_CC; tcpstat.tcps_connects++; soisconnected(so); /* Do window scaling on this connection? */ diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c index 1b9f755..fc4afec 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.60 1997/08/16 19:15:39 wollman Exp $ + * $Id: tcp_input.c,v 1.61 1997/09/16 18:36:05 joerg Exp $ */ #include "opt_tcpdebug.h" @@ -808,15 +808,17 @@ findpcb: * option, check it to make sure this segment really * matches our SYN. If not, just drop it as old * duplicate, but send an RST if we're still playing - * by the old rules. + * by the old rules. If no CC.ECHO option, make sure + * we don't get fooled into using T/TCP. */ - if ((to.to_flag & TOF_CCECHO) && - tp->cc_send != to.to_ccecho) { - if (taop->tao_ccsent != 0) - goto drop; - else - goto dropwithreset; - } + if (to.to_flag & TOF_CCECHO) { + if (tp->cc_send != to.to_ccecho) + if (taop->tao_ccsent != 0) + goto drop; + else + goto dropwithreset; + } else + tp->t_flags &= ~TF_RCVD_CC; tcpstat.tcps_connects++; soisconnected(so); /* Do window scaling on this connection? */ |