summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/sshconnect.c
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2016-01-25 08:56:15 -0200
committerRenato Botelho <renato@netgate.com>2016-01-25 08:56:15 -0200
commiteb84e0723f3b4bc5e40024f66fe21c14b09e9ec4 (patch)
treefec6b99d018e13f1fccbe31478aaf29a28a55642 /crypto/openssh/sshconnect.c
parentc50df8e1b90c4f9b8bbffa592477c129854776ce (diff)
parent94b1bbbd44bd88b6db1c00d795cdf7675b3ae254 (diff)
downloadFreeBSD-src-eb84e0723f3b4bc5e40024f66fe21c14b09e9ec4.zip
FreeBSD-src-eb84e0723f3b4bc5e40024f66fe21c14b09e9ec4.tar.gz
Merge remote-tracking branch 'origin/stable/10' into devel
Diffstat (limited to 'crypto/openssh/sshconnect.c')
-rw-r--r--crypto/openssh/sshconnect.c32
1 files changed, 3 insertions, 29 deletions
diff --git a/crypto/openssh/sshconnect.c b/crypto/openssh/sshconnect.c
index 65ee91f..3384de6 100644
--- a/crypto/openssh/sshconnect.c
+++ b/crypto/openssh/sshconnect.c
@@ -1,5 +1,4 @@
/* $OpenBSD: sshconnect.c,v 1.246 2014/02/06 22:21:01 djm Exp $ */
-/* $FreeBSD$ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -15,6 +14,7 @@
*/
#include "includes.h"
+__RCSID("$FreeBSD$");
#include <sys/types.h>
#include <sys/wait.h>
@@ -265,29 +265,6 @@ ssh_kill_proxy_command(void)
}
/*
- * Set TCP receive buffer if requested.
- * Note: tuning needs to happen after the socket is created but before the
- * connection happens so winscale is negotiated properly.
- */
-static void
-ssh_set_socket_recvbuf(int sock)
-{
- void *buf = (void *)&options.tcp_rcv_buf;
- int socksize, sz = sizeof(options.tcp_rcv_buf);
- socklen_t len = sizeof(int);
-
- debug("setsockopt attempting to set SO_RCVBUF to %d",
- options.tcp_rcv_buf);
- if (setsockopt(sock, SOL_SOCKET, SO_RCVBUF, buf, sz) >= 0) {
- getsockopt(sock, SOL_SOCKET, SO_RCVBUF, &socksize, &len);
- debug("setsockopt SO_RCVBUF: %.100s %d", strerror(errno),
- socksize);
- } else
- error("Couldn't set socket receive buffer to %d: %.100s",
- options.tcp_rcv_buf, strerror(errno));
-}
-
-/*
* Creates a (possibly privileged) socket for use as the ssh connection.
*/
static int
@@ -303,9 +280,6 @@ ssh_create_socket(int privileged, struct addrinfo *ai)
}
fcntl(sock, F_SETFD, FD_CLOEXEC);
- if (options.tcp_rcv_buf > 0)
- ssh_set_socket_recvbuf(sock);
-
/* Bind the socket to an alternative local IP address */
if (options.bind_address == NULL && !privileged)
return sock;
@@ -546,10 +520,10 @@ static void
send_client_banner(int connection_out, int minor1)
{
/* Send our own protocol version identification. */
- xasprintf(&client_version_string, "SSH-%d.%d-%.100s%s%s%s%s",
+ xasprintf(&client_version_string, "SSH-%d.%d-%.100s%s%s%s",
compat20 ? PROTOCOL_MAJOR_2 : PROTOCOL_MAJOR_1,
compat20 ? PROTOCOL_MINOR_2 : minor1,
- SSH_VERSION, options.hpn_disabled ? "" : SSH_VERSION_HPN,
+ SSH_VERSION,
*options.version_addendum == '\0' ? "" : " ",
options.version_addendum, compat20 ? "\r\n" : "\n");
if (roaming_atomicio(vwrite, connection_out, client_version_string,
OpenPOWER on IntegriCloud