Conversation
Commit cc0483f split the CMP services into separate source files, but the waf source list was not updated at the same time. Add the new src/cmp/*.c files to wscript so waf builds include the CMP handlers as well. Fixes: cc0483f ("split cmp services into separate files") Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
libcsp was previously licensed under LGPL, but it has since been relicensed under the MIT license. The Meson project definition still used the old license identifier. Update the license parameter in meson.build. Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v6...v7) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Initialize the integer value passed to setsockopt() for SO_REUSEADDR. SO_REUSEADDR expects an integer boolean option value. Set it to 1 so address reuse is enabled instead of passing an uninitialized value. Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
Add Ubuntu 26.04 to the build-test matrix. The GitHub-hosted Ubuntu 26.04 runner image is now available in public preview. Replace the separate OS and compiler matrix axes with explicit Ubuntu/compiler targets so each runner is paired only with GCC versions available on that image. This removes the need for an exclude list. Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
Compiling with CSP_ENABLE_CSP_PRINT set to false fails because compiler reports unused arguments as in this case csp_print does nothing with them. This fix uses the arguments in an `if(0)` or in a void cast to keep them referenced by the compiler and suppress the errors.
Add check-compile-options.yml that checks compilation with a defined set of options.
The CSP_PS branch of csp_service_handler() frees the packet when csp_ps_hook() returns 0 (the shipped default) but then break()s, so the shared post-switch csp_sendto_reply() runs on the freed buffer: a use-after-free / double-ownership of a buffer-pool slot, triggerable by a single CSP_PS packet. Return after the free, mirroring the CSP_CMP, CSP_REBOOT and default branches.
Refactor out the repeated byte-order conversion, buffer copy, and length assignment used by the MEMFREE, BUF_FREE, and UPTIME services. No functionality has been changed. Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
Remove the unnecessary null check before sending the service reply, since all paths that do not send a reply return earlier. No functionality has been changed. Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
Replace repeated buffer-free and return sequences with a shared discard path in the service handler. No functionality has been changed. Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
Set the library version and ABI version from the Meson project version. This produces libcsp.so.2.2 with the SONAME libcsp.so.2, matching the CMake build. Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
Set vnum and cnum from the Waf project version. This produces an installed libcsp.so.2.2 with the SONAME libcsp.so.2, matching the CMake build. Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
This is necessary to build libcsp with Yocto
Add bindings to: * add a custom interface (iface_add) * manipulate a packet ID (id_prepend, id_strip, id_setup_rx) * read a packet ID (packet_get*) * read and write a packet frame data (packet_get_frame_length, packet_set_frame_data)
The UDP interface aliased the parsed server string, which the loader then freed, leaving a dangling host pointer in the interface driver state. Duplicate it with strdup so the interface owns its own copy, matching the existing interface name handling.
Dependabot-generated commit messages can contain lines longer than gitlint's 80-character body limit due to package URLs. Ignore only the body line-length rule for Dependabot commits while keeping the remaining gitlint checks enabled. Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
A branch update for a pull request triggers both the push and pull_request workflows. This causes the same checks to run twice. Limit push workflows to develop and libcsp-* branches so pull requests run only the pull_request workflows. Assisted-by: Codex:GPT-5 Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 6 to 7. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](actions/setup-python@v6...v7) --- updated-dependencies: - dependency-name: actions/setup-python dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
When CSP_ENABLE_CSP_PRINT is 0, the inline csp_hex_dump() stub declares its addr parameter as `void *` while the public prototype and the implementation use `const void *`. This causes a "conflicting types for csp_hex_dump" compile error when CSP print is disabled. Change the stub to `const void *` to match the public API. Assisted-by: GitHub Copilot CLI:claude-fable-5 Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
The doxygen comment above csp_send_direct() documented a from_me parameter that the function does not take and a return value for a void function, which is confusing for library users. The from_me parameter actually belongs to csp_send_direct_iface(), which had no documentation at all. Rewrite the comment to match the actual prototype and add a proper doxygen comment for csp_send_direct_iface(). No functionality has been changed. Assisted-by: GitHub Copilot CLI:claude-fable-5 Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
Name the connection-less delivery condition in csp_route_work() so the routing code states its intent instead of testing option bits inline. No functionality has been changed. Assisted-by: GitHub Copilot CLI:claude-fable-5 Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
csp_route_work() mixes routing decisions with the details of each local delivery mode, making the overall packet flow hard to follow. Extract the three local delivery paths into named functions so that the routine reads as its actual pipeline: forward if not mine, then deliver to a callback, a connection-less socket, or a connection. The helpers document that a connection-less socket is itself the endpoint, while for connection-oriented operation the connection is the endpoint and the socket only accepts new server-side connections. No functionality has been changed. Assisted-by: GitHub Copilot CLI:claude-fable-5 Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
The security check was duplicated in every delivery path, and each path had to know which endpoint type it was handling before the packet had even been validated. Resolve the endpoint first: an existing connection, or the bound socket. Run csp_route_security_check() once with the resolved endpoint options, then branch on connection-less versus connection-oriented delivery. This makes the dual endpoint types of libcsp explicit: a connection-less socket is an endpoint itself, while connection-oriented traffic terminates in a connection. A connection-less socket port never matches an existing connection, because connections use ephemeral or server-side port pairs, so the lookup order does not change behavior. No functionality has been changed. Assisted-by: GitHub Copilot CLI:claude-fable-5 Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.