Subject: [Tsvwg] SCTP: Error about shutdown of an association?

From: Wei Yongjun <[email-masked]>
Date: Mon, 13 Oct 2008 13:10:36 +0800

RFC4960 defined:

   Once an endpoint has reached the SHUTDOWN-RECEIVED state, it MUST NOT
   send a SHUTDOWN in response to a ULP request, and should discard
   subsequent SHUTDOWN chunks.

This said SHUTDOWN chunk will be discarded in SHUTDOWN-RECEIVED state.

Also:
   While in the SHUTDOWN-SENT state, the SHUTDOWN sender MUST
   immediately respond to each received packet containing one or more
   DATA chunks with a SHUTDOWN chunk and restart the T2-shutdown timer.
   If a SHUTDOWN chunk by itself cannot acknowledge all of the received
   DATA chunks (i.e., there are TSNs that can be acknowledged that are
   larger than the cumulative TSN, and thus gaps exist in the TSN
   sequence), or if duplicate TSNs have been received, then a SACK chunk
   MUST also be sent.

This said if SHUTDOWN chunk can ack all of the received DATA chunks, SACK
may not be send in SHUTDOWN-SENT state.

This cause the association can be not shutdown in the following case:

Endpoint A                       Endpoing B
(ESTABLISHED)                    (ESTABLISHED)
                <-------         DATA(TSN=1)
SACK(TSN=1)     -------->
SHUTDOWN(TSN=1) --\  /--         DATA(TSN=2)
                   \/
                   /\
               <--/  \-->        enter SHUTDOWN-RECEIVED state
SHUTDOWN(TSN=2) -------->        Discarded
               <---------        DATA(TSN=2) retransmit
SHUTDOWN(TSN=2) -------->        Discarded
                 ......

The DATA chunk and SHUTDOWN chunk will be retransmitted again and again,
association can not be shutdown correctly.

We need force to send SACK when DATA is received in SHUTDOWN-SENT
state, or not discard the SHUTDOWN chunk in SHUTDOWN-RECEIVED state.

Is this correct?

Thanks
Wei Yongjun

---

From: Randy Stewart <[email-masked]>
Date: Tue, 14 Oct 2008 06:51:14 -0400

Wei Yongjun:

You have pointed out a bug in the spec... not a critical
one but one that no one else as noticed.

It should say

subsequent ULP requests.

Note that this is NOT even a SHOULD.. its just a should so it
can be ignored. A should in lower case is just a suggestion not
a mandate or strong mandate ... i.e. a MUST is a mandate an
SHOULD is a "you really really really need to do this
unless you have a special reason". A lower case should has
no binding at all.

R

> state, or not discard the SHUTDOWN chunk in SHUTDOWN-RECEIVED state.

-----
Randall Stewart
[email-masked]

---

From: Michael Tüxen <[email-masked]>
Date: Tue, 14 Oct 2008 13:35:35 +0200

Hi Randy,

what about (just to be explicit):

Old Text:
Once an endpoint has reached the SHUTDOWN-RECEIVED state,
it MUST NOT send a SHUTDOWN in response to a ULP request,
and should discard subsequent SHUTDOWN chunks.

New Text:
Once an endpoint has reached the SHUTDOWN-RECEIVED state,
it MUST NOT send a SHUTDOWN in response to a ULP request.
The Cumulative TSN Ack of the received SHUTDOWN chunk
MUST be processed.

Should this be submitted as an errata?

Best regards
Michael

---

From: Chris Benson <[email-masked]>
Date: Tue, 14 Oct 2008 12:04:59 -0700 (PDT)

Michael,

>>  The Cumulative TSN Ack of the received SHUTDOWN chunk

I think the second sentence above "should" be clearer about
applying multiple times.

The Cumulative TSN Ack of all subsequently received SHUTDOWN 
chunks MUST be processed, while in SHUTDOWN-RECEIVED state.

I am considering Wei Yongjun's original timing diagram, but with
an extra DATA TSN=3 following immediately after DATA TSN=2, 
resulting in two subsequent SHUTDOWN replies with different 
Cumulative TSN Ack values. I think both values should be
processed upon receipt.

With thanks, from Chris Benson.
    [email-masked]

On Tue, 14 Oct 2008, Michael Tüxen wrote:

>>  Date: Tue, 14 Oct 2008 13:35:35 +0200
>>  From: Michael Tüxen <[email-masked]>
>>  To: Randy Stewart <[email-masked]>
>>  Cc:  <[email-masked]>, Wei Yongjun <[email-masked]>
>>  Subject: Re: [Tsvwg] SCTP: Error about shutdown of an association?
>>  
>>  Hi Randy,
>>

---

From: Michael Tüxen <[email-masked]>
Date: Tue, 14 Oct 2008 21:08:31 +0200

Chris,

comments in-line.

Best regards
Michael

> chunks MUST be processed, while in SHUTDOWN-RECEIVED state.
OK.
> Cumulative TSN Ack values. I think both values should be
Sure. That is intended.