|
|
@ -1112,11 +1112,23 @@ create_remote(listen_ctx_t *listener, |
|
|
|
setsockopt(remotefd, SOL_SOCKET, SO_NOSIGPIPE, &opt, sizeof(opt)); |
|
|
|
#endif |
|
|
|
|
|
|
|
if (listener->mptcp == 1) { |
|
|
|
int err = setsockopt(remotefd, SOL_TCP, MPTCP_ENABLED, &opt, sizeof(opt)); |
|
|
|
if (listener->mptcp > 1) { |
|
|
|
int err = setsockopt(remotefd, SOL_TCP, listener->mptcp, &opt, sizeof(opt)); |
|
|
|
if (err == -1) { |
|
|
|
ERROR("failed to enable multipath TCP"); |
|
|
|
} |
|
|
|
} else if (listener->mptcp == 1) { |
|
|
|
int i = 0; |
|
|
|
while((listener->mptcp = mptcp_enabled_values[i]) > 0) { |
|
|
|
int err = setsockopt(remotefd, SOL_TCP, listener->mptcp, &opt, sizeof(opt)); |
|
|
|
if (err != -1) { |
|
|
|
break; |
|
|
|
} |
|
|
|
i++; |
|
|
|
} |
|
|
|
if (listener->mptcp == 0) { |
|
|
|
ERROR("failed to enable multipath TCP"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// Setup |
|
|
|