Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 0 additions & 32 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2644,38 +2644,6 @@ if test ! -z "$check_for_openpty_ctty_bug"; then
fi


# Testing MPTCP Support
# Does the OS support MPTCP?
# We don't use this at the moment
# but I am holding it in resrve -cjr 04/04/2025
AC_MSG_CHECKING([whether the OS supports MPTCP])
AC_RUN_IFELSE(
[AC_LANG_PROGRAM([[
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <stdbool.h>
#include <netinet/in.h>

]], [[
int sock = -1;
sock = socket(AF_INET, SOCK_STREAM, IPPROTO_MPTCP);
if (sock < 0) {
exit(1);
}
]])],
[
AC_MSG_RESULT([yes])
AC_DEFINE([HAVE_MPTCP], [1],
[OS Supports MPTCP])
],
[
AC_MSG_RESULT([no])
]
)

if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
test "x$check_for_hpux_broken_getaddrinfo" = "x1"; then
AC_MSG_CHECKING([if getaddrinfo seems to work])
Expand Down
4 changes: 0 additions & 4 deletions defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -941,10 +941,6 @@ struct winsize {
# define SSH_IOBUFSZ (32*1024)
#endif

#ifndef IPPROTO_MPTCP
#define IPPROTO_MPTCP 262
#endif

/*
* We want functions in openbsd-compat, if enabled, to override system ones.
* We no-op out the weak symbol definition rather than remove it to reduce
Expand Down
5 changes: 3 additions & 2 deletions hpnsshd_config.5
Original file line number Diff line number Diff line change
Expand Up @@ -2067,9 +2067,10 @@ directives.
.It Cm UseMPTCP
If set to
.Cm yes ,
this will enable Multipath TCP (MPTCP) instead of TCP (this only works on Linux).
this will enable Multipath TCP (MPTCP) support. This only works on Linux. MPTCP
will be used if requested by clients. If not, TCP will be used as before.
The default is
.Cm no .
.Cm yes .
.It Cm UsePAM
Enables the Pluggable Authentication Module interface.
If set to
Expand Down
2 changes: 1 addition & 1 deletion servconf.c
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ fill_default_server_options(ServerOptions *options)
if (options->hpn_disabled == -1)
options->hpn_disabled = 0;
if (options->use_mptcp == -1)
options->use_mptcp = 0;
options->use_mptcp = 1;
if (options->ip_qos_interactive == -1)
options->ip_qos_interactive = IPTOS_DSCP_EF;
if (options->ip_qos_bulk == -1)
Expand Down
4 changes: 4 additions & 0 deletions sshconnect.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,11 @@ ssh_create_socket(struct addrinfo *ai)

/* user request for Multipath TCP */
if (options.use_mptcp)
#ifdef IPPROTO_MPTCP
sock = socket(ai->ai_family, ai->ai_socktype, IPPROTO_MPTCP);
#else
sock = -1;
#endif
else
sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);

Expand Down
7 changes: 6 additions & 1 deletion sshd.c
Original file line number Diff line number Diff line change
Expand Up @@ -827,10 +827,15 @@ listen_on_addrs(struct listenaddr *la)
continue;
}
/* Create socket for listening. */
listen_sock = -1;
#ifdef IPPROTO_MPTCP
if (options.use_mptcp)
listen_sock = socket(ai->ai_family, ai->ai_socktype,
IPPROTO_MPTCP);
else
#endif

/* Fallback to "plain" TCP if MPTCP is not available */
if (listen_sock == -1)
listen_sock = socket(ai->ai_family, ai->ai_socktype,
ai->ai_protocol);

Expand Down
2 changes: 1 addition & 1 deletion sshd_config
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ AuthorizedKeysFile .ssh/authorized_keys
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none
#UseMPTCP no
#UseMPTCP yes

# no default banner path
#Banner none
Expand Down