Skip to content

Fix QNX 8 (io-sock) build and runtime support#1048

Open
jmrnunes wants to merge 1 commit into
COVESA:masterfrom
jmrnunes:qnx8-io-sock-support
Open

Fix QNX 8 (io-sock) build and runtime support#1048
jmrnunes wants to merge 1 commit into
COVESA:masterfrom
jmrnunes:qnx8-io-sock-support

Conversation

@jmrnunes

@jmrnunes jmrnunes commented Jul 2, 2026

Copy link
Copy Markdown

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 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.hppget_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.
  • 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.

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 no SO_PEERCRED equivalent 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.

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>
@andrefesilva

Copy link
Copy Markdown
Contributor

Due to the new ICTS rules (#1036), for the moment we will not accept any new PRs.

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