[freeBSD-6.1RELEASE] wonderings about function tcp_input()



Hi, all:

I have a question about line 1765 to 1776 in tcp_input():

/*
* If the ACK bit is off: if in SYN-RECEIVED state or SENDSYN
* flag is on (half-synchronized state), then queue data for
* later processing; else drop segment and return.
*/
if ((thflags & TH_ACK) == 0) {
if (tp->t_state == TCPS_SYN_RECEIVED ||
(tp->t_flags & TF_NEEDSYN))
goto step6;
else
goto drop;
}

My question is: if we are currently in TCPS_SYN_RECEIVED state, why does a segment without ACK bother? Why we need to store the segment and process it? Without considering T/TCP, the code should be:

if ((thflags & TH_ACK) == 0) {
goto drop;
}

Best regards,

blue


_______________________________________________
freebsd-net@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: [freeBSD-6.1RELEASE] wonderings about function tcp_input()
    ... flag is on, ... goto step6; ... if we are currently in TCPS_SYN_RECEIVED state, why does a segment without ACK bother? ...
    (freebsd-net)
  • Re: Sockets
    ... If you look at how TCP works, you discover that having your remote ... you send a full, hence complete segment. ... small data elements into a single segment to keep performance ... The oponent - once it will get your segment will send an ACK back to ...
    (microsoft.public.pocketpc.developer)
  • Re: TSO and IPoIB performance degradation
    ... which is bad for congestion on the internet. ... that brings-back all that stuff I posted ages ago about the performance delta when using an HP-UX receiver and altering the number of segmetns per ACK. ... every second full-sized segment that arrives. ...
    (Linux-Kernel)
  • Re: TSO and IPoIB performance degradation
    ... To improve efficiency a data receiver ... may refrain from sending an ACK for each incoming segment, ... every second full-sized segment that arrives. ... until we have at least two full sized segments? ...
    (Linux-Kernel)
  • Re: _Psych_, USA network
    ... Now I love Regis but I just ... couldn't watch the segment!) ... Ack! ...
    (rec.arts.tv)