Skip to content

Conversation

@addisonpolcyn
Copy link
Contributor

@addisonpolcyn addisonpolcyn commented Nov 14, 2025

Adapted from: versatica/mediasoup#1156

The Dtls bios may produce packet sizes larger than the standard 1500 MTU using the default configuration. This manually sets a maximum limit of 1350, which will avoid the error log of:

The DTLS stack is trying to send a packet of %d bytes, this may be larger than the MTU and get dropped!

When setting the maximum limit, the Dtls bios will internally fragment packets instead of having Janus outsource this task to the IP layer.

We observed cases where this error log would emit beyond 1500 and our MTU sizes presumably because as per this conversation: https://mta.openssl.org/pipermail/openssl-users/2015-June/001511.html a fallback MTU size was not provided BIO_CTRL_DGRAM_GET_FALLBACK_MTU. This solution is adapted from mediasoup's solution for handling dtls fragmentation.

This was tested with internal test cases and mtu sizes of 400/576/1200.

@januscla
Copy link

Thanks for your contribution, @addisonpolcyn! Please make sure you sign our CLA, as it's a required step before we can merge this.

@addisonpolcyn addisonpolcyn marked this pull request as ready for review November 14, 2025 01:09
@addisonpolcyn addisonpolcyn marked this pull request as draft November 14, 2025 22:16
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