Subject: [tcpm] Sequence number checking for incoming RST segments

From: "Indraneel Ghosh" <[email-masked]>
Date: Sun, 23 Oct 2005 06:50:53 -0700

Hi,

 I had a question regarding the sequence-number check for acceptance of incoming RST segments. It seems that some TCP stacks (e.g. the Linux stack shown below) apply a different sequence number check to RST segments, than what is specified in RFC793 i.e. the {RCV.NXT, RCV.NXT+RCV.WND} check 

 If someone is familiar with this, could you pls send me an email mentioning what RCV.WUP means exactly (I was guessing that it was the last ACK sent by the local i.e. receiving device).
 Also, what is the commonly-accepted sequence-number check for incoming RST segments, in case the check in RFC793 is seen as inappropriate for RST segments (is there any RFC/other-doc that discusses this) ?

 Sorry for asking this question here, in case this is not the appropriate forum.

 Thanks in advance for any help,

 Indraneel 

http://www.cs.purdue.edu/homes/fahmy/software/flowmate/tcp_input.c

/* Check segment sequence number for validity.
 *
 * Segment controls are considered valid, if the segment
 * fits to the window after truncation to the window. Acceptability
 * of data (and SYN, FIN, of course) is checked separately.
 * See tcp_data_queue(), for example.
 *
 * Also, controls (RST is main one) are accepted using RCV.WUP instead
 * of RCV.NXT. Peer still did not advance his SND.UNA when we
 * delayed ACK, so that hisSND.UNA<=ourRCV.WUP.
 * (borrowed from freebsd)
 */

static inline int tcp_sequence(struct tcp_opt *tp, u32 seq, u32 end_seq)
{
	return	!before(end_seq, tp->rcv_wup) &&
		!after(seq, tp->rcv_nxt + tcp_receive_window(tp));
}

_______________________________________________
tcpm mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/tcpm

---

From: Ted Faber <[email-masked]>
Date: Mon, 24 Oct 2005 09:42:44 -0700

On Sun, Oct 23, 2005 at 06:50:53AM -0700, Indraneel Ghosh wrote:
> 
>  Hi,
> 
>  I had a question regarding the sequence-number check for acceptance
>  of incoming RST segments. It seems that some TCP stacks (e.g. the
>  Linux stack shown below) apply a different sequence number check to
>  RST segments, than what is specified in RFC793 i.e. the {RCV.NXT,
>  RCV.NXT+RCV.WND} check 

I'd start here: 
http://www.ietf.org/internet-drafts/draft-ietf-tcpm-tcpsecure-03.txt

Then I'd check the tcpm archives for discussion on that topic.  there's
been a bit.  Those are here:
http://www1.ietf.org/mail-archive/web/tcpm/current/index.html

That won't answer your variable name question, but should get you the
ideas behind what's going on.  More or less.  

-- 
Ted Faber
http://www.isi.edu/~faber           PGP: http://www.isi.edu/~faber/pubkeys.asc
Unexpected attachment on this mail? See http://www.isi.edu/~faber/FAQ.html#SIG
_______________________________________________
tcpm mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/tcpm