8000 nanocoap_sock: don't include token in empty ACK response by benpicco · Pull Request #19366 · RIOT-OS/RIOT · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

nanocoap_sock: don't include token in empty ACK response #19366

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

8000
Merged
merged 1 commit into from
Mar 8, 2023

Conversation

benpicco
Copy link
Contributor
@benpicco benpicco commented Mar 8, 2023

Contribution description

CoAP doesn't expect a Token in an empty ACK, but coap_build_hdr() will copy it over if we give it a token length.

This is bad as here we only provide space for the CoAP header ack. coap_build_hdr() will copy the token into snip where it causes all kinds of mayhem.

Testing procedure

Issues/PRs references

@benpicco benpicco added the Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) label Mar 8, 2023
@benpicco benpicco requested review from chrysn and maribu March 8, 2023 00:51
@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Mar 8, 2023
@github-actions github-actions bot added Area: CoAP Area: Constrained Application Protocol implementations Area: network Area: Networking Area: sys Area: System labels Mar 8, 2023
@benpicco benpicco force-pushed the nanocoap_sock-ack branch from 65436de to 84827a4 Compare March 8, 2023 00:52
Copy link
Member
@maribu maribu left a comment

Choose a reason for hiding this comment

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

Please update the PR description before starting bors and replace "ACK response" with "empty ACK". "ACK response" would generally be understood as an ACK with a piggybacked response payload, which would need the token.

And empty ACK however MUST NOT have a token; this fixes a severe standard violation. Thx for spotting it

@riot-ci
Copy link
riot-ci commented Mar 8, 2023

Murdock results

✔️ PASSED

d6e05da nanocoap_sock: don't include token in empty ACK response

Success Failures Total Runtime
6882 0 6882 13m:36s

Artifacts

@benpicco benpicco force-pushed the nanocoap_sock-ack branch from 84827a4 to d6e05da Compare March 8, 2023 10:38
@benpicco benpicco changed the title nanocoap_sock: don't include token in ACK response nanocoap_sock: don't include token in empty ACK response Mar 8, 2023
@benpicco
Copy link
Contributor Author
benpicco commented Mar 8, 2023

bors merge

bors bot added a commit that referenced this pull request Mar 8, 2023
19366: nanocoap_sock: don't include token in empty ACK response r=benpicco a=benpicco



19367: cord: bump reference from draft to rfc r=benpicco a=bergzand

### Contribution description

The draft is an RFC, this bumps the "see also" in the docs to the rfc.

### Testing procedure

Check that the correct RFC is linked in the docs.

### Issues/PRs references

None


Co-authored-by: Benjamin Valentin <benjamin.valentin@ml-pa.com>
Co-authored-by: Koen Zandberg <koen@bergzand.net>
@benpicco
Copy link
Contributor Author
benpicco commented Mar 8, 2023

bors cancel
bors merge

@bors
Copy link
Contributor
bors bot commented Mar 8, 2023

Canceled.

@benpicco
Copy link
Contributor Author
benpicco commented Mar 8, 2023

bors merge

@bors
Copy link
Contributor
bors bot commented Mar 8, 2023

Already running a review

@bors
Copy link
Contributor
bors bot commented Mar 8, 2023

Build succeeded:

@bors bors bot merged commit 1a5cc2a into RIOT-OS:master Mar 8, 2023
@benpicco benpicco deleted the nanocoap_sock-ack branch March 8, 2023 14:55
@MrKevinWeiss MrKevinWeiss added this to the Release 2023.04 milestone Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: CoAP Area: Constrained Application Protocol implementations Area: network Area: Networking Area: sys Area: System CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0