Fix QNX 8 (io-sock) build and runtime support#1048
Open
jmrnunes wants to merge 1 commit into
Open
Conversation
The in-tree QNX support targets QNX 7 (io-pkt) and is regressed for QNX 8 (io-sock). These changes make vsomeip build and run on QNX 8; all are guarded by __QNX__ and have no effect on other platforms. * qnx_helper.hpp: add the missing closing #endif (the top #ifdef __QNX__ was unterminated, breaking every QNX build) and a SO_RCVBUFFORCE -> SO_RCVBUF fallback (SO_RCVBUFFORCE is Linux-only). * socket_options.hpp: include qnx_helper.hpp on QNX so IP_PKTINFO / in_pktinfo are defined. * asio_uds_socket.hpp: get_peer_credentials() returns success with default credentials on QNX. QNX io-sock has no SO_PEERCRED/ucred; returning failure makes the local endpoint's sec_client update fail, so vsomeip rejects its own routing-manager connection and never registers/offers. This disables peer-credential policy on QNX; the comment notes it can be upgraded to a real credential source (QNX message-passing side channel) gated behind the security config. * wrappers_qnx.cpp: drop the QNX 7 <sys/sockmsg.h> message-passing accept implementation (that header no longer exists on QNX 8, which provides a native accept4() with SOCK_CLOEXEC); keep only the CLOEXEC __wrap_socket / __wrap_accept / __wrap_open linker targets. Tested on QNX SDP 8.0 (aarch64, Raspberry Pi 4): a QNX service and a Linux client exchanged a SOME/IP request/response. Signed-off-by: Jorge Nunes <jorge.nunes@outlook.pt> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
|
Due to the new ICTS rules (#1036), for the moment we will not accept any new PRs. |
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.
What
The in-tree QNX support targets QNX 7 (io-pkt) and is regressed for QNX 8 (io-sock). This PR makes vsomeip build and run on QNX 8. All changes are guarded by
__QNX__and have no effect on other platforms.qnx_helper.hpp— add the missing closing#endif(the top#ifdef __QNX__was unterminated, which breaks every QNX build) and aSO_RCVBUFFORCE -> SO_RCVBUFfallback (SO_RCVBUFFORCEis Linux-only).socket_options.hpp— includeqnx_helper.hppon QNX soIP_PKTINFO/in_pktinfoare defined.asio_uds_socket.hpp—get_peer_credentials()returns success with default credentials on QNX. QNX io-sock has noSO_PEERCRED/ucred; returning failure makes the local endpoint'ssec_clientupdate fail, so vsomeip rejects its own routing-manager connection and never registers/offers.wrappers_qnx.cpp— drop the QNX 7<sys/sockmsg.h>message-passingacceptimplementation (that header no longer exists on QNX 8, which provides a nativeaccept4()withSOCK_CLOEXEC); keep only the CLOEXEC__wrap_socket/__wrap_accept/__wrap_openlinker targets.Testing
Tested on QNX SDP 8.0 (aarch64, Raspberry Pi 4): a QNX service and a Linux client exchanged a SOME/IP request/response successfully.
Open question for maintainers
The
get_peer_credentials()change currently disables peer-credential-based policy on QNX (there is noSO_PEERCREDequivalent on io-sock). The code comment notes this can be upgraded to a real credential source — e.g. the QNX message-passing side channel (ConnectServerInfo/_client_info) to obtain the peer pid/uid/gid — and gated behind vsomeip's security config. Happy to rework this along whatever lines you prefer.