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

PING/PONG ambiguity #1051

Closed
mkieweg opened this issue Jan 14, 2018 · 5 comments
Closed

PING/PONG ambiguity #1051

mkieweg opened this issue Jan 14, 2018 · 5 comments
Labels
-transport editorial An issue that does not affect the design of the protocol; does not require consensus.

Comments

@mkieweg
Copy link

mkieweg commented Jan 14, 2018

The definition of PING and PONG frames are ambiguous.

Section 8.9 states:

If the Data field is not empty, the recipient of this frame MUST generate a
PONG frame (Section 8.15) containing the same Data.

Section 8.15 states:

If the content of a PONG frame does not match the content of a PING frame
previously sent by the endpoint, the endpoint MAY generate a connection error of type
UNSOLICITED_PONG.

The way I see it either the MAY in Section 8.15 has to be a MUST to solve this ambiguity or the part in Section 8.9 has to be changed into something less strict.
This would be my preferred option since it gives the PING/PONG frames a little bit more semantic leeway.

@mikkelfj
Copy link
Contributor

mikkelfj commented Jan 14, 2018

Even if the PONG'er behaves correctly, arbitrary network delays may cause PONG packets to arrive after they are no longer remembered by the PING'er. Requiring a MUST makes correct evalutation much harder, either by storing PING frames indefinitely or by using some hashing to confirm the validity of the PONG frame.

@martinthomson
Copy link
Member

@mikkelfj's answer here is the reason that this isn't a MUST. @boisjacques, do you think that there needs to be some better explanation of this?

@mkieweg
Copy link
Author

mkieweg commented Jan 15, 2018

Thank you for the clarification, for me it's clear now. However it might help to make the implicit explanation more explicit.

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

PING and PONG have been replaced by PING, PATH_CHALLENGE, and PATH_RESPONSE, so hopefully that closes this issue?

@MikeBishop
Copy link
Contributor

The text is still there, but I agree with @mikkelfj and @martinthomson that the text is correct. The sender MUST do the right thing, but the receiver isn't required to track sufficient information to detect it 100% of the time.

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

No branches or pull requests

5 participants