In-session path-MTU black-hole detection and recovery
The follow-up 0.16.0 deferred, and the fix for the remaining VPN reports. The handshake probes the path MTU in one direction only, so a tunnel that drops large datagrams on the return path only — OpenVPN's default configuration does not fragment oversized UDP, and its drops are direction-asymmetric (see OpenVPN/openvpn#823) — or a path that shrinks mid-session, passed the probe and then hung the connection on the first split payload while the same too-large datagram was resent until timeout.
- The reliability layer now recognises the black-hole signature — a reliable packet unacked through its resend budget that would actually shrink if the MTU dropped a rung — steps the connection's MTU one rung down the same ladder the handshake probes, and re-splits every queued message that no longer fits. Detection completes within a few retransmission timeouts, well inside the connection timeout. (#56)
- Packets that already fit the next rung never trigger a step-down, however often they are resent: ordinary packet loss cannot shrink a healthy connection's MTU.
- Stuck split messages are rebuilt from the shared data block their fragments reference and re-sent under a fresh split id with ordering/sequencing indices, exact bit length and ack-receipt serials preserved — the receiver's stalled partial reassembly is superseded in place and ordered channels resume exactly where they blocked. Oversized unsplit reliable messages are simply split; unreliable ones are dropped, which is what the network was already doing to them.
- New API:
ReliabilityLayer::GetCurrentMtuBytes();RakPeerInterface::GetMTUSize()now reports the stepped-down value after a recovery.
Non-breaking: RAKNET_PROTOCOL_VERSION stays at 7, no message ids move, and the split/reassembly wire format is unchanged — the new per-fragment bookkeeping is sender-side only. A step-down is permanent for the life of the connection.
Full changelog: https://github.com/MafiaHub/MafiaNet/blob/master/docs/changelog.rst
What's Changed
- fix(reliability): detect in-session path-MTU black holes and step the MTU down by @Segfaultd in #56
Full Changelog: v0.16.0...v0.17.0