summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/ssh.c
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2016-01-19 14:38:20 +0000
committerdes <des@FreeBSD.org>2016-01-19 14:38:20 +0000
commit43b4a69321547147333695abb6579e202b6b7967 (patch)
treeacb631e3e03ea67e3c3f3ce06f17a5e93d213a64 /crypto/openssh/ssh.c
parent23cbd2460dd7d0438e97d67eb18a0bd5acf7ea9c (diff)
downloadFreeBSD-src-43b4a69321547147333695abb6579e202b6b7967.zip
FreeBSD-src-43b4a69321547147333695abb6579e202b6b7967.tar.gz
As previously threatened, remove the HPN patch from OpenSSH.
Diffstat (limited to 'crypto/openssh/ssh.c')
-rw-r--r--crypto/openssh/ssh.c49
1 files changed, 3 insertions, 46 deletions
diff --git a/crypto/openssh/ssh.c b/crypto/openssh/ssh.c
index 443dcd6..eaeb5c7 100644
--- a/crypto/openssh/ssh.c
+++ b/crypto/openssh/ssh.c
@@ -633,13 +633,11 @@ main(int ac, char **av)
case 'V':
if (options.version_addendum &&
*options.version_addendum != '\0')
- fprintf(stderr, "%s%s %s, %s\n", SSH_RELEASE,
- options.hpn_disabled ? "" : SSH_VERSION_HPN,
+ fprintf(stderr, "%s %s, %s\n", SSH_RELEASE,
options.version_addendum,
SSLeay_version(SSLEAY_VERSION));
else
- fprintf(stderr, "%s%s, %s\n", SSH_RELEASE,
- options.hpn_disabled ? "" : SSH_VERSION_HPN,
+ fprintf(stderr, "%s, %s\n", SSH_RELEASE,
SSLeay_version(SSLEAY_VERSION));
if (opt == 'V')
exit(0);
@@ -1657,46 +1655,9 @@ ssh_session2_open(void)
if (!isatty(err))
set_nonblock(err);
- /*
- * We need to check to see what to do about buffer sizes here.
- * - In an HPN to non-HPN connection we want to limit the window size to
- * something reasonable in case the far side has the large window bug.
- * - In an HPN to HPN connection we want to use the max window size but
- * allow the user to override it.
- * - Lastly if HPN is disabled then use the ssh standard window size.
- *
- * We cannot just do a getsockopt() here and set the ssh window to that
- * as in case of autotuning of socket buffers the window would get stuck
- * at the initial buffer size, generally less than 96k. Therefore we
- * need to set the maximum ssh window size to the maximum HPN buffer
- * size unless the user has set TcpRcvBufPoll to no. In that case we
- * can just set the window to the minimum of HPN buffer size and TCP
- * receive buffer size.
- */
- if (tty_flag)
- options.hpn_buffer_size = CHAN_SES_WINDOW_DEFAULT;
- else
- options.hpn_buffer_size = CHAN_HPN_MIN_WINDOW_DEFAULT;
-
- if (datafellows & SSH_BUG_LARGEWINDOW) {
- debug("HPN to Non-HPN Connection");
- } else if (options.tcp_rcv_buf_poll <= 0) {
- sock_get_rcvbuf(&options.hpn_buffer_size, 0);
- debug("HPNBufferSize set to TCP RWIN: %d",
- options.hpn_buffer_size);
- } else if (options.tcp_rcv_buf > 0) {
- sock_get_rcvbuf(&options.hpn_buffer_size,
- options.tcp_rcv_buf);
- debug("HPNBufferSize set to user TCPRcvBuf: %d",
- options.hpn_buffer_size);
- }
- debug("Final hpn_buffer_size = %d", options.hpn_buffer_size);
- channel_set_hpn(options.hpn_disabled, options.hpn_buffer_size);
- window = options.hpn_buffer_size;
-
+ window = CHAN_SES_WINDOW_DEFAULT;
packetmax = CHAN_SES_PACKET_DEFAULT;
if (tty_flag) {
- window = CHAN_SES_WINDOW_DEFAULT;
window >>= 1;
packetmax >>= 1;
}
@@ -1704,10 +1665,6 @@ ssh_session2_open(void)
"session", SSH_CHANNEL_OPENING, in, out, err,
window, packetmax, CHAN_EXTENDED_WRITE,
"client-session", /*nonblock*/0);
- if (!options.hpn_disabled && options.tcp_rcv_buf_poll > 0) {
- c->dynamic_window = 1;
- debug("Enabled Dynamic Window Scaling\n");
- }
debug3("ssh_session2_open: channel_new: %d", c->self);
OpenPOWER on IntegriCloud