Subject: [quicwg/base-drafts] Allow RST_STREAM to be sent and received after FIN (#781)

From: janaiyengar <[email-masked]>
Date: Tue, 19 Sep 2017 19:45:44 +0000 (UTC)

Closes #779.
You can view, comment on, or merge this pull request online at:

  https://github.com/quicwg/base-drafts/pull/781

-- Commit Summary --

  * Allow RST_STREAM to be sent and received after FIN

-- File Changes --

    M draft-ietf-quic-transport.md (10)

-- Patch Links --

https://github.com/quicwg/base-drafts/pull/781.patch
https://github.com/quicwg/base-drafts/pull/781.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/781

---

From: ianswett <[email-masked]>
Date: Tue, 19 Sep 2017 12:50:02 -0700

ianswett commented on this pull request.

> @@ -2648,6 +2650,10 @@ closes a stream SHOULD be discarded.  An endpoint MAY choose to limit the period
 over which it ignores frames and treat frames that arrive after this time as
 being in error.
 
+An endpoint may receive a RST_STREAM after a FIN if the peer resets the stream
+after sending a FIN on it. In this case, the endpoint MAY discard any data that
+it already received on that stream.

How about adding a sentence that the endpoing MAY close the connection if a stream is reset with a different offset from the previously received fin.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/781#pullrequestreview-63781627

---

From: ekr <[email-masked]>
Date: Tue, 19 Sep 2017 12:53:58 -0700

ekr commented on this pull request.

> @@ -2615,8 +2615,10 @@ Any frame type that mentions a stream ID can be sent in this state.
 
 A stream that is in the "half-closed (local)" state MUST NOT be used for sending
 on new STREAM frames.  Retransmission of data that has already been sent on
-STREAM frames is permitted.  An endpoint MAY also send MAX_STREAM_DATA and
-STOP_SENDING in this state.
+STREAM frames is permitted.  If the stream is canceled or reset while in this
+state, a RST_STREAM frame MAY be sent. A RST_STREAM frame sent in this state

Are cancelled or reset different?

I would think should

> @@ -2615,8 +2615,10 @@ Any frame type that mentions a stream ID can be sent in this state.
 
 A stream that is in the "half-closed (local)" state MUST NOT be used for sending
 on new STREAM frames.  Retransmission of data that has already been sent on
-STREAM frames is permitted.  An endpoint MAY also send MAX_STREAM_DATA and
-STOP_SENDING in this state.
+STREAM frames is permitted.  If the stream is canceled or reset while in this
+state, a RST_STREAM frame MAY be sent. A RST_STREAM frame sent in this state

It's probably useful to say why you would do this.

I would put the "if first" so it reads "If the peer resets the stream...."

> @@ -2615,8 +2615,10 @@ Any frame type that mentions a stream ID can be sent in this state.
 
 A stream that is in the "half-closed (local)" state MUST NOT be used for sending
 on new STREAM frames.  Retransmission of data that has already been sent on
-STREAM frames is permitted.  An endpoint MAY also send MAX_STREAM_DATA and
-STOP_SENDING in this state.
+STREAM frames is permitted.  If the stream is canceled or reset while in this
+state, a RST_STREAM frame MAY be sent. A RST_STREAM frame sent in this state

So I can also send multiple RST_STREAMs?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/781#pullrequestreview-63782336

---

From: janaiyengar <[email-masked]>
Date: Tue, 19 Sep 2017 19:57:10 +0000 (UTC)

@janaiyengar pushed 1 commit.

54f2900  Rephrase.

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/781/files/c15a611db13a417bd9eaf78b80dd6ffe07fb8621..54f2900170ecd4ffd62f609aca4e7246bab31622

---

From: janaiyengar <[email-masked]>
Date: Tue, 19 Sep 2017 21:19:47 +0000 (UTC)

janaiyengar commented on this pull request.

It can, but they'd be indistinguishable from a retransmission

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/781#discussion_r139821107

---

From: janaiyengar <[email-masked]>
Date: Tue, 19 Sep 2017 14:20:44 -0700

d964707  ekr/ianswett comments

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/781/files/54f2900170ecd4ffd62f609aca4e7246bab31622..d964707474ad48edb2000c73d527ead6e8203d6b

---

From: janaiyengar <[email-masked]>
Date: Tue, 19 Sep 2017 21:22:25 +0000 (UTC)

ekr: github is acting weird, so responding to one of your comments here. You suggested SHOULD for "the endpoint MAY discard any data that it already received on that stream." I'm sticking with MAY, since that's consistent with text around what to do with a received RST_STREAM. Perhaps we should change this in both places.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/781#issuecomment-330677434

---

From: Mike Bishop <[email-masked]>
Date: Tue, 19 Sep 2017 15:11:30 -0700

This PR covers half-closed, but you can also send/receive RST_STREAM in closed to avert retransmissions.  If we're being explicit, we should cover that case as well.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/781#issuecomment-330688619

---

From: janaiyengar <[email-masked]>
Date: Tue, 19 Sep 2017 16:27:46 -0700

b234013  mike's comment

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/781/files/d964707474ad48edb2000c73d527ead6e8203d6b..b234013ec82cf057ef733a207e3917edcc9158f3

---

From: janaiyengar <[email-masked]>
Date: Tue, 19 Sep 2017 16:28:13 -0700

Thanks, Mike -- good point! I've added some text.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/781#issuecomment-330701959

---

From: Mike Bishop <[email-masked]>
Date: Wed, 20 Sep 2017 05:59:49 +0000 (UTC)

👍

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/781#issuecomment-330753245

---

From: janaiyengar <[email-masked]>
Date: Fri, 22 Sep 2017 22:53:30 +0000 (UTC)

Since this is simply stating explicitly what is already implicitly said, I am committing this. I am not closing the issue with this PR.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/781#issuecomment-331578550

---

From: janaiyengar <[email-masked]>
Date: Fri, 22 Sep 2017 22:54:50 +0000 (UTC)

Hm. I spoke too soon - I don't have any approvals on this PR yet, and I don't want to submit this with approval, so I'll wait for @martinthomson to review this.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/781#issuecomment-331578724

---

From: Mike Bishop <[email-masked]>
Date: Fri, 22 Sep 2017 17:21:17 -0700

MikeBishop approved this pull request.

I approve the changes with the update, FWIW.  :-)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/781#pullrequestreview-64725019

---

From: Martin Thomson <[email-masked]>
Date: Mon, 25 Sep 2017 05:28:30 +0000 (UTC)

martinthomson approved this pull request.

> @@ -2618,6 +2618,11 @@ on new STREAM frames.  Retransmission of data that has already been sent on
 STREAM frames is permitted.  An endpoint MAY also send MAX_STREAM_DATA and
 STOP_SENDING in this state.
 
+An application with a stream in this state may no longer care about data sent on
+the stream and may choose to reset the stream. To permit this behavior, a

s/To permit this behavior, a/A/

Or just replace the first two sentences with "An application can decide to abandon a stream in this state.  An endpoint can send RST_STREAM for a stream that was closed with the FIN flag."  Keep the final offset piece.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/781#pullrequestreview-64797282

---

From: janaiyengar <[email-masked]>
Date: Thu, 28 Sep 2017 22:21:40 +0000 (UTC)

12b7d86  martin's nits

-- 
You are receiving this because you are subscribed to this thread.
View it on GitHub:
https://github.com/quicwg/base-drafts/pull/781/files/b234013ec82cf057ef733a207e3917edcc9158f3..12b7d866fa8743a8c31e700b22f1bb410384af53

---

From: Martin Thomson <[email-masked]>
Date: Thu, 28 Sep 2017 15:44:42 -0700

Merged #781.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/781#event-1270744476

---

From: Martin Thomson <[email-masked]>
Date: Thu, 28 Sep 2017 15:44:54 -0700

Thanks Jana.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/quicwg/base-drafts/pull/781#issuecomment-332984047