Subject: iss calculation during TIME_WAIT ressurection ?

From: Mohan Parthasarathy <[email-masked]>
Date: Thu, 4 Feb 1999 16:22:56 -0800 (PST)

RFC1122 states that

	    When a connection is closed actively, it MUST linger in
            TIME-WAIT state for a time 2xMSL (Maximum Segment Lifetime).
            However, it MAY accept a new SYN from the remote TCP to
            reopen the connection directly from TIME-WAIT state, if it:

            (1)  assigns its initial sequence number for the new
                 connection to be larger than the largest sequence
                 number it used on the previous connection incarnation,

Looking at BSD code, it used the "rcv_nxt" field to calculate the new
iss :

			if (tiflags & TH_SYN &&
                            tp->t_state == TCPS_TIME_WAIT &&
                            SEQ_GT(ti->ti_seq, tp->rcv_nxt)) {
                                iss = tp->rcv_nxt + TCP_ISSINCR;
                                tp = tcp_close(tp);
                                goto findpcb;
                        }

Is this a bug in the TCP code ? Should it not use snd_nxt ?

thanks
-mohan