Skip to content

Configuration option to allow IP fragmentation on outbound UDP sockets in ssserver #1780

@tom-ryan

Description

@tom-ryan

Hello! I have a use case where outbound UDP traffic from ssserver sometimes needs to traverse a network with a smaller MTU. Unfortunately I don't have control over the network or the application sending the traffic.

I saw that per previous issues on this project, IP fragmentation was disabled to improve performance. For my use case, it's preferable to allow IP fragmentation / accept the performance overhead.

I tested that by commenting out the following lines, UDP traffic was fragmented as expected:

if let Err(err) = set_disable_ip_fragmentation(af, &socket) {
warn!("failed to disable IP fragmentation, error: {}", err);
}

What do you think about adding a new configuration option in ssserver like allow_outbound_udp_fragmentation ? The default will be false, keeping the current behavior. When allow_outbound_udp_fragmentation = true, set_disable_ip_fragmentation will be skipped. If that sounds OK, I'll be happy to submit a patch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions