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

Improve MTU Handling #1521

Merged
merged 1 commit into from
Sep 17, 2024
Merged

Improve MTU Handling #1521

merged 1 commit into from
Sep 17, 2024

Conversation

kkrentz
Copy link
Contributor

@kkrentz kkrentz commented Sep 17, 2024

The main issue that this PR solves is that on Contiki-NG one can create PDUs that will not fit in the uIP buffer. The problem is that the value of COAP_DEFAULT_MAX_PDU_RX_SIZE is incorrect and a check in coap_pdu_init is also flawed. On LWIP, there seems to be an analogous problem.

@kkrentz kkrentz force-pushed the mtu-pr branch 4 times, most recently from 0814fe0 to 0152bbf Compare September 17, 2024 07:56
Copy link
Collaborator

@mrdeep1 mrdeep1 left a comment

Choose a reason for hiding this comment

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

Thanks for this. Other than I think the LwIP original code is correct, the commits need to be squashed into a single commit.

include/coap3/coap_pdu_internal.h Outdated Show resolved Hide resolved
by:
- Correcting Contiki-NG's value of COAP_DEFAULT_MAX_PDU_RX_SIZE
- Denying to create PDUs longer than COAP_DEFAULT_MAX_PDU_RX_SIZE
- Using the MTU setter, thereby not overriding stack-specific limits
- Using existing constants for L4-specific header sizes
@mrdeep1 mrdeep1 merged commit ac83b32 into obgm:develop Sep 17, 2024
31 checks passed
@kkrentz kkrentz deleted the mtu-pr branch September 17, 2024 12:42
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

Successfully merging this pull request may close these issues.

2 participants