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

net: lwm2m: Bootstrap discovery fixes #78085

Merged

Conversation

rlubos
Copy link
Contributor

@rlubos rlubos commented Sep 6, 2024

Fix bootstrap discovery response formatting issues, which prevented successful bootstrap with Leshan.
Verified with Leshan, both LwM2M 1.0 and LwM2M 1.1 versions, with and w/o security enabled.

Fixes #77061

The second Security object instance for bootstrap case isn't really
needed, as the bootstrap server creates own Security object instances
anyway. As that object instance had no Short Server ID assigned, it
caused failures during bootstrap discovery.

Signed-off-by: Robert Lubos <[email protected]>
LwM2M 1.1 specification mentions that the enabler version format was
specified wrongly in LwM2M 1.0 specification, and servers only "may"
accept the old format, which no longer seems to be the case for Leshan.

The URI reference ("</>;") before the enabler version is now mandatory,
if it's missing the bootstrap discovery fails with Leshan. Another
problem are quotes around the enabler version, which seems to be
conditionally accepted only for LwM2M version 1.0. Therefore, keep the
quotes only for that version, to prevent any potential issues with other
servers.

Signed-off-by: Robert Lubos <[email protected]>
kartben
kartben previously approved these changes Sep 6, 2024
@kartben kartben assigned jukkar and rlubos and unassigned kartben and jukkar Sep 6, 2024
SeppoTakalo
SeppoTakalo previously approved these changes Sep 6, 2024
Align bootstrap discovery tests case with the enabler version reporting
changes.

Signed-off-by: Robert Lubos <[email protected]>
@rlubos rlubos dismissed stale reviews from SeppoTakalo and kartben via 28e0cc1 September 6, 2024 09:57
@rlubos
Copy link
Contributor Author

rlubos commented Sep 6, 2024

Additional commit was needed to align test case with the changes.

@carlescufi carlescufi merged commit ac51e30 into zephyrproject-rtos:main Sep 10, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LwM2M: Bootstrap with discover fails with Leshan server
6 participants