summaryrefslogtreecommitdiffstats
path: root/debian/patches/progress-linux/0007-mptcp-headers.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/progress-linux/0007-mptcp-headers.patch')
-rw-r--r--debian/patches/progress-linux/0007-mptcp-headers.patch56
1 files changed, 56 insertions, 0 deletions
diff --git a/debian/patches/progress-linux/0007-mptcp-headers.patch b/debian/patches/progress-linux/0007-mptcp-headers.patch
new file mode 100644
index 0000000..2d2512b
--- /dev/null
+++ b/debian/patches/progress-linux/0007-mptcp-headers.patch
@@ -0,0 +1,56 @@
+Author: mpostaire <maxime_postaire@hotmail.fr>
+Description: Code cleanup + IPPROTO_MPTCP in defines header.
+ https://github.com/openssh/openssh-portable/pull/335
+
+diff --git a/defines.h b/defines.h
+index 279e509a..d73550a9 100644
+--- a/defines.h
++++ b/defines.h
+@@ -892,6 +892,10 @@ struct winsize {
+ # define SSH_IOBUFSZ 8192
+ #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
+diff --git a/sshconnect.c b/sshconnect.c
+index 308bd755..63035a9d 100644
+--- a/sshconnect.c
++++ b/sshconnect.c
+@@ -359,10 +359,8 @@ ssh_create_socket(struct addrinfo *ai)
+ #endif
+ char ntop[NI_MAXHOST];
+
+- if (options.use_mptcp)
+- sock = socket(ai->ai_family, ai->ai_socktype, IPPROTO_MPTCP);
+- else
+- sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
++ sock = socket(ai->ai_family, ai->ai_socktype,
++ options.use_mptcp ? IPPROTO_MPTCP : ai->ai_protocol);
+ if (sock == -1) {
+ error("socket: %s", strerror(errno));
+ return -1;
+diff --git a/sshd.c b/sshd.c
+index 3f12299b..102079ac 100644
+--- a/sshd.c
++++ b/sshd.c
+@@ -1046,13 +1046,8 @@ listen_on_addrs(struct listenaddr *la)
+ continue;
+ }
+ /* Create socket for listening. */
+- if (options.use_mptcp) {
+- listen_sock = socket(ai->ai_family, ai->ai_socktype,
+- IPPROTO_MPTCP);
+- } else {
+- listen_sock = socket(ai->ai_family, ai->ai_socktype,
+- ai->ai_protocol);
+- }
++ listen_sock = socket(ai->ai_family, ai->ai_socktype,
++ options.use_mptcp ? IPPROTO_MPTCP : ai->ai_protocol);
+ if (listen_sock == -1) {
+ /* kernel may not support ipv6 */
+ verbose("socket: %.100s", strerror(errno));