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
This commit is contained in:
parent
f1e536f2c7
commit
b4b48f580d
@ -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 @@ tcp_input(m, iphlen)
|
||||
|
||||
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 @@ tcp_input(m, iphlen)
|
||||
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;
|
||||
|
@ -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 @@ tcp_input(m, iphlen)
|
||||
|
||||
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 @@ tcp_input(m, iphlen)
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user