Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pad to 38 if you want a stateless reset #1682

Merged
merged 3 commits into from Aug 22, 2018
Merged

Pad to 38 if you want a stateless reset #1682

merged 3 commits into from Aug 22, 2018

Conversation

martinthomson
Copy link
Member

But there isn't much point in doing that if you aren't expecting a response, so ACK-only packets don't need the same treatment (unless, like @huitema, you are doing that for a measure of traffic analysis protection).

Closes #1681.

@martinthomson martinthomson added editorial An issue that does not affect the design of the protocol; does not require consensus. -transport labels Aug 17, 2018
Copy link
Contributor

@huitema huitema left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, you can just as well pad the ACK-only packets. They could trigger a stateless reset just like any other packet.

@martinthomson
Copy link
Member Author

The point with ACK-only is that you aren't expecting a response, so there is no point in asking for one. Maybe it's best to say nothing on that point anyway. I was not 100% on that bit.

@@ -2733,6 +2733,9 @@ a small packet might result in Stateless Reset not being useful in detecting
cases of broken connections where only very small packets are sent; such
failures might only be detected by other means, such as timers.

An endpoint that wants to improve the chances that it triggers a Stateless Reset
when its peer loses state can pad all packets it sends to 38 octets.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All packets seems like a lot of padding. In practice, I'd only expect people to pad timer-initiated packets like PING for keepalive or TLP/RTO packets.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Mikkel pointed out that if you do that, all short packets are 38 bytes, except for stateless reset which are exactly 37, and therefore stand out. That's not a hugely useful property. What Ian suggests makes more sense, and in that case you want to pad to something unpredictable, for example between 38 and 256. But this is of course a game of smoke and mirrors, so you want the peer to also randomly pad the responses to ping and tlp/rto. Oh well...

Copy link
Contributor

@MikeBishop MikeBishop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe instead of talking about the all-time case, we just say that "An endpoint can increase the odds that a packet will trigger a Stateless Reset if it cannot be processed by padding it to at least 38 octets."? Then we leave the decision of which packets deserve that treatment to the implementation.

@@ -2733,8 +2733,8 @@ a small packet might result in Stateless Reset not being useful in detecting
cases of broken connections where only very small packets are sent; such
failures might only be detected by other means, such as timers.

An endpoint that wants to improve the chances that it triggers a Stateless Reset
when its peer loses state can pad all packets it sends to 38 octets.
An endpoint can increase the odds that a packet will trigger a Stateless Reset
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does increasing it above 38 not ensure it will trigger a Stateless Reset? If so, I'd prefer "An endpoint can ensure that a packet will trigger..."

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would hope that stateless reset is an optional feature and when it is on, resets can be send at senders discretion, e.g. implementing rate limiting.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mikkelfj is right, this doesn't guarantee that you get a stateless reset. The point here is that the odds of receiving one for packets below 38 octets is much lower.

Copy link
Contributor

@huitema huitema left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the current sentence is pretty good.

Copy link
Contributor

@ianswett ianswett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're well into wishy-washy land, but this seems clear enough.

@martinthomson martinthomson merged commit e03ded6 into master Aug 22, 2018
@martinthomson
Copy link
Member Author

Good enough for me.

@martinthomson martinthomson deleted the recommend-38 branch August 22, 2018 03:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
-transport editorial An issue that does not affect the design of the protocol; does not require consensus.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants