From fa15d9693f20a1d49b95d4547541c8b7d5bf7d31 Mon Sep 17 00:00:00 2001 From: Sergey Radionov Date: Tue, 10 Mar 2026 20:28:13 +0700 Subject: [PATCH] janus: Tailscale has 1280 MTU actually (#326) --- janus/src/rtp.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/janus/src/rtp.h b/janus/src/rtp.h index dc28c6b..43b2e1f 100644 --- a/janus/src/rtp.h +++ b/janus/src/rtp.h @@ -27,13 +27,13 @@ // Max RTP size for WebRTC is 1200 bytes: // - https://stackoverflow.com/questions/47635545/why-webrtc-chose-rtp-max-packet-size-to-1200-bytes -// But(!) Tailscale has 1200 MTU. So to fit it required to substract: +// But(!) Tailscale has 1280 MTU. So to fit it required to subtract: // 1. possible RTP extensions (see sdp.c) // 2. additional SRTP fields (>= 10 bytes) // 3. UDP header (8 bytes) // 4. IPv6 header (40 bytes) -// Finally it looks like 100 bytes for all above should be enough -#define US_RTP_TOTAL_SIZE (1200 - 100) +// Finally it looks like below value should be good enought for all cases +#define US_RTP_TOTAL_SIZE 1150 #define US_RTP_HEADER_SIZE 12 #define US_RTP_PAYLOAD_SIZE (US_RTP_TOTAL_SIZE - US_RTP_HEADER_SIZE)