View Issue Details

IDProjectCategoryView StatusLast Update
0008904libmicrohttpdotherpublic2024-07-31 13:07
Reportermatttbe Assigned ToChristian Grothoff  
PrioritynormalSeverityfeatureReproducibilityN/A
Status closedResolutionno change required 
PlatformLinux 
Product VersionGit master 
Target Version1.0.1Fixed in Version1.0.0 
Summary0008904: Add Multipath TCP (MPTCP) support
DescriptionHello,

First, thank you for developing and maintaining this useful lib!

Could it be possible to add MPTCP support on Linux please?

> Multipath TCP or MPTCP is an extension to the standard TCP and is described in RFC 8684. It allows a device to make use of multiple interfaces at once to send and receive TCP packets over a single MPTCP connection. MPTCP can aggregate the bandwidth of multiple interfaces or prefer the one with the lowest latency. It also allows a fail-over if one path is down, and the traffic is seamlessly reinjected on other paths.

Please see this website for more details: https://www.mptcp.dev

Adding MPTCP support in applications is very simple: when creating the socket, the `IPPROTO_MPTCP` flag has to be set instead of TCP, e.g.:

    socket(AF_INET(6), SOCK_STREAM, IPPROTO_MPTCP);

That's it! Note that when MPTCP is not supported by the kernel, this syscall will fail. If needed, the app can decide to create a "plain" TCP one instead. For more details: https://www.mptcp.dev/implementation.html

Also, when a listening MPTCP socket is created, MPTCP will only be used when requested by the client. If not, the 'accepted' socket will be a plain TCP one, like before. Thanks to that, and with a minimal impact on the "existing traffic", MPTCP can easily be enabled by default on the server side.
TagsLinux

Activities

Christian Grothoff

2024-07-31 00:57

manager   ~0022874

I don't think we need to change anything in the library for this: you can open the listen socket yourself and set the option (don't forget to bind()), and then pass the listen socket to the daemon.

matttbe

2024-07-31 13:00

reporter   ~0022879

Hi Christian,

Thank you for your reply.

> I don't think we need to change anything in the library for this: you can open the listen socket yourself and set the option (don't forget to bind()), and then pass the listen socket to the daemon.

Ah yes, I missed the `MHD_OPTION_LISTEN_SOCKET` option. Maybe a bit less obvious to use than an explicit option, and more work for the developers using the lib. On the other word, it can then be used with SystemD, when the next version will be released: https://github.com/systemd/systemd/pull/32958

Christian Grothoff

2024-07-31 13:01

manager   ~0022880

Yes, a bit more work, but also this way the core functionality of the library remains 100% portable, and if you want to do platform-specific hacks, you still can!

Issue History

Date Modified Username Field Change
2024-06-06 16:38 matttbe New Issue
2024-06-06 16:38 matttbe Tag Attached: Linux
2024-07-31 00:57 Christian Grothoff Note Added: 0022874
2024-07-31 00:57 Christian Grothoff Status new => feedback
2024-07-31 13:00 matttbe Note Added: 0022879
2024-07-31 13:00 matttbe Status feedback => new
2024-07-31 13:01 Christian Grothoff Note Added: 0022880
2024-07-31 13:06 Christian Grothoff Assigned To => Christian Grothoff
2024-07-31 13:06 Christian Grothoff Status new => resolved
2024-07-31 13:06 Christian Grothoff Resolution open => no change required
2024-07-31 13:06 Christian Grothoff Fixed in Version => 1.0.0
2024-07-31 13:07 Christian Grothoff Status resolved => closed
2024-07-31 13:07 Christian Grothoff Product Version => Git master
2024-07-31 13:07 Christian Grothoff Target Version => 1.0.1