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

CoAP discovery response does not follow CoRE link format specification #31609

Closed
kasunch opened this issue Jan 26, 2021 · 0 comments · Fixed by #31610
Closed

CoAP discovery response does not follow CoRE link format specification #31609

kasunch opened this issue Jan 26, 2021 · 0 comments · Fixed by #31610
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug

Comments

@kasunch
Copy link
Contributor

kasunch commented Jan 26, 2021

Describe the bug
CoAP RFC (RFC7252) states that end points should support the CoRE Link Format of discoverable resources as described in RFC6690 (refer section 7.2 of the RFC7252).
However, the current CoAP implementation does not place comma “,” and semicolon “;” in appropriate places in the payload according to the RFC6690.

To Reproduce
Follow the usual building and flashing steps for "samples/net/sockets/coap_server" application on any board.
The payload of the discovery response is as shown below.

</test>;</seg1/seg2/seg3>;</wild1/+/wild3>;</wild2/#>;</query>;</separate>;</location-query>;</large>;</large-update>;</large-create>;</obs>;</core1>title="Core 1";rt=core1;</core2>title="Core 1";rt=core1;

Expected behavior
According to the RFC6690, the payload should be formatted as follows.

</test>,</seg1/seg2/seg3>,</wild1/+/wild3>,</wild2/#>,</query>,</separate>,</location-query>,</large>,</large-update>,</large-create>,</obs>,</core1>;title="Core 1";rt=core1,</core2>;title="Core 1";rt=core1

Impact
CoAP client libraries which follow RFC6690 may fail to parse the discovery response.

@kasunch kasunch added the bug The issue is a bug, or the PR is fixing a bug label Jan 26, 2021
@nashif nashif added the priority: medium Medium impact/importance bug label Jan 26, 2021
@nashif nashif assigned rlubos and unassigned jukkar Jan 26, 2021
kasunch added a commit to kasunch/zephyr that referenced this issue Jan 26, 2021
CoAP RFC (RFC7252) states that end points should support
the CoRE Link Format of discoverable resources as described in RFC6690
(refer section 7.2 of the RFC7252).

Fixes zephyrproject-rtos#31609

Signed-off-by: Kasun Hewage <[email protected]>
nashif pushed a commit that referenced this issue Jan 27, 2021
CoAP RFC (RFC7252) states that end points should support
the CoRE Link Format of discoverable resources as described in RFC6690
(refer section 7.2 of the RFC7252).

Fixes #31609

Signed-off-by: Kasun Hewage <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants