diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 1b9f7554a400..fc4afec6a5e5 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 1b9f7554a400..fc4afec6a5e5 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? */