Fix --mptcp on kernels with mainlined MPTCP.

Mainlined MPTCP on Linux 5.6+ is enabled with IPPROTO_MPTCP rather than setsockopt.
This commit is contained in:
Tristan Schmelcher
2022-05-23 09:11:50 +08:00
committed by Max Lv
parent e21f8248b6
commit 1630764b02
5 changed files with 38 additions and 4 deletions
+2
View File
@@ -60,12 +60,14 @@ typedef struct {
char *port;
} ss_addr_t;
#ifndef IPPROTO_MPTCP
/* MPTCP_ENABLED setsockopt values for kernel 4 & 3, best behaviour to be independant of kernel version is to test from newest to the latest values */
#ifndef MPTCP_ENABLED
static const char mptcp_enabled_values[] = { 42, 26, 0 };
#else
static const char mptcp_enabled_values[] = { MPTCP_ENABLED, 0 };
#endif
#endif
#ifndef UPDATE_INTERVAL
#define UPDATE_INTERVAL 5