Skip to content

v0.15.0

Choose a tag to compare

@Segfaultd Segfaultd released this 24 Aug 08:21
· 7 commits to master since this release

Session handshake

Connection reporting is now gated on a session-config exchange — an opaque application payload sent in both directions after the transport connection is up but before either side reports a connection (#54). ID_CONNECTION_REQUEST_ACCEPTED / ID_NEW_INCOMING_CONNECTION are withheld until the exchange completes, so an application can no longer act on a connection whose configuration has not arrived yet.

New API: SetSessionConfig / GetSessionConfig / GetRemoteSessionConfig, plus SetSessionConfigInteractive / AcceptSession / RejectSession for servers that inspect a client's payload before admitting it — surfaced through the normal Receive() loop, no network-thread callbacks. The exchange is client-first, so a refused peer is refused having received nothing.

Hardened by design: admission control counts handshaking peers, server-to-client handshake messages are bound to the connection's initiator, remote payload buffers are always NUL-terminated beyond the reported length, payloads are capped at 64 KB, and application traffic cannot cross a connection the application has not been told about — in either direction. See docs/advanced/session-handshake-security.rst for the trust model.

Breaking: RAKNET_PROTOCOL_VERSION 6 → 7 — older peers are rejected with ID_INCOMPATIBLE_PROTOCOL_VERSION instead of stalling. The new message ids come out of the reserved block, so ID_USER_PACKET_ENUM does not move.

Fixes

  • GetNumberOfAddresses() always returned MAXIMUM_NUMBER_OF_INTERNAL_IDS (10) instead of the real local address count — inherited from SLikeNet (#43)
  • The RPC4GlobalRegistration constructors never NUL-terminated a maximum-length function name, causing a read past the array (#52)

Full Changelog: v0.14.0...v0.15.0

What's Changed

  • fix(peer): GetNumberOfAddresses() always returned MAXIMUM_NUMBER_OF_INTERNAL_IDS by @Segfaultd in #43
  • fix(rpc4): NUL-terminate RPC4GlobalRegistration functionName by @Segfaultd in #52
  • feat(peer): gate connection reporting on a session handshake by @Segfaultd in #54

Full Changelog: v0.14.0...v0.15.0