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

Should a client check the ACK token to match? #17

Open
Adirio opened this issue Jan 10, 2017 · 0 comments
Open

Should a client check the ACK token to match? #17

Adirio opened this issue Jan 10, 2017 · 0 comments

Comments

@Adirio
Copy link

Adirio commented Jan 10, 2017

A rare situation where a CoAP server is modifying the message token has been found. CoAPthon server is generating a message token when the request's token is empty. #16 has been opened to see if it is legal, but this behaviour has shown a CoAP client implementation (h5.coap) is checking that the token received matches the one sent.

When an empty-token message is sent from h5.coap clients to a CoAPthon server, the second is generating a token and thus the acknowledgement is being rejected, sending the original empty-token message again (and receiving a random-token ack again) until the maximum allowed number of retries is reached.

I'm quite sure that CoAPthon's behaviour of generating a token is not RFC compliant, but is h5.coap token matching check RFC compliant? I know for certain that most CoAP client implementations do not check this. The only reference I've found in the specification is in section 5.3.2:

In case a message carrying a response is unexpected (the client is not waiting for a response from the identified endpoint, at the endpoint addressed, and/or with the given token), the response is rejected (Sections 4.2 and 4.3).

The bolded section may be a definition of this situation thus meaning that the response is unexpected and therefore should be rejected. Is h5.coap, being the only implementation that takes this into consideration as far as I know, the only RFC compliant client implementation in this sense?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant