diff options
author | olah <olah@FreeBSD.org> | 1995-11-03 22:31:54 +0000 |
---|---|---|
committer | olah <olah@FreeBSD.org> | 1995-11-03 22:31:54 +0000 |
commit | d4e1ca409e7a6793834f1d23b4cf9947cb0beae9 (patch) | |
tree | 0848d210c9ebc7fe23829a2e93b203c993306b0b /sys/netinet/tcp_reass.c | |
parent | eceba0e335583e577b9dc1efd1da8e19d0d298ae (diff) | |
download | FreeBSD-src-d4e1ca409e7a6793834f1d23b4cf9947cb0beae9.zip FreeBSD-src-d4e1ca409e7a6793834f1d23b4cf9947cb0beae9.tar.gz |
Cosmetic changes to processing of segments in the SYN_SENT state:
- remove a redundant condition;
- complete all validity checks on segment before calling
soisconnected(so).
Reviewed by: Richard Stevens, davidg, wollman
Diffstat (limited to 'sys/netinet/tcp_reass.c')
-rw-r--r-- | sys/netinet/tcp_reass.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c index 29143fb..c64d398 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.29 1995/10/03 16:54:12 wollman Exp $ + * $Id: tcp_input.c,v 1.30 1995/10/13 16:00:25 wollman Exp $ */ #ifndef TUBA_INCLUDE @@ -768,15 +768,7 @@ findpcb: tp->irs = ti->ti_seq; tcp_rcvseqinit(tp); - if (tiflags & TH_ACK && SEQ_GT(ti->ti_ack, tp->iss)) { - tcpstat.tcps_connects++; - soisconnected(so); - /* Do window scaling on this connection? */ - if ((tp->t_flags & (TF_RCVD_SCALE|TF_REQ_SCALE)) == - (TF_RCVD_SCALE|TF_REQ_SCALE)) { - tp->snd_scale = tp->requested_s_scale; - tp->rcv_scale = tp->request_r_scale; - } + if (tiflags & TH_ACK) { /* * Our SYN was acked. If segment contains CC.ECHO * option, check it to make sure this segment really @@ -791,6 +783,14 @@ findpcb: else goto dropwithreset; } + tcpstat.tcps_connects++; + soisconnected(so); + /* Do window scaling on this connection? */ + if ((tp->t_flags & (TF_RCVD_SCALE|TF_REQ_SCALE)) == + (TF_RCVD_SCALE|TF_REQ_SCALE)) { + tp->snd_scale = tp->requested_s_scale; + tp->rcv_scale = tp->request_r_scale; + } /* Segment is acceptable, update cache if undefined. */ if (taop->tao_ccsent == 0) taop->tao_ccsent = to.to_ccecho; |