Subject: Re: Question on snippet of tcp_input
To: B. James Phillippe \(spamblock\) <bryan-spamtrap4@darkforest.org>
From: Jason R Thorpe <thorpej@wasabisystems.com>
List: tech-net
Date: 08/30/2002 16:17:02
On Fri, Aug 30, 2002 at 03:43:45PM -0700, B. James Phillippe (spamblock) wrote:
> /*
> * Verify the sequence and ack numbers. Try getting the correct
> * response again.
> */
> if ((th->th_ack != sc->sc_iss + 1) ||
> SEQ_LEQ(th->th_seq, sc->sc_irs) ||
> SEQ_GT(th->th_seq, sc->sc_irs + 1 + sc->sc_win)) {
> (void) syn_cache_respond(sc, m);
> splx(s);
> return ((struct socket *)(-1));
> }
>
> If syn_cache_get() is only ever called for packets which have TH_ACK set
> without TH_SYN and without TH_RST set, th->th_seq should always be 0,
> correct? Is there a purpose for the tests of th->th_seq?
See RFC793, section 3.4.
--
-- Jason R. Thorpe <thorpej@wasabisystems.com>