diff options
author | sommerfeld <sommerfeld@pkgsrc.org> | 1999-08-17 15:24:41 +0000 |
---|---|---|
committer | sommerfeld <sommerfeld@pkgsrc.org> | 1999-08-17 15:24:41 +0000 |
commit | 0c776e4efad96b9ddc708cbd5e9db949158837d6 (patch) | |
tree | 21645d2dd5730bb84967870a98a4e5695135570d /security/ssh | |
parent | 0ac2c5319789b4274c3156efcd2ec65a2da94677 (diff) | |
download | pkgsrc-0c776e4efad96b9ddc708cbd5e9db949158837d6.tar.gz |
Performance fix for ssh X11 forwarding: turn on TCP_NODELAY on local
stub connections on client and server side. (it was correctly being
enabled over the long-haul connection, but somehow it got missed on
the loopback connections to the real X client and server)
This makes x2x over ssh actually pleasant to use.
Diffstat (limited to 'security/ssh')
-rw-r--r-- | security/ssh/files/patch-sum | 6 | ||||
-rw-r--r-- | security/ssh/patches/patch-aq | 41 |
2 files changed, 37 insertions, 10 deletions
diff --git a/security/ssh/files/patch-sum b/security/ssh/files/patch-sum index ea26bdf9309..08afec890b4 100644 --- a/security/ssh/files/patch-sum +++ b/security/ssh/files/patch-sum @@ -1,4 +1,4 @@ -$NetBSD: patch-sum,v 1.3 1999/07/17 03:41:06 jlam Exp $ +$NetBSD: patch-sum,v 1.4 1999/08/17 15:24:41 sommerfeld Exp $ MD5 (patch-aa) = dca3a23f5066125131e34fba33baa4ae MD5 (patch-ab) = 712a7ffc9d2686153df92e32ce6b43bb @@ -12,8 +12,6 @@ MD5 (patch-am) = fd4e766e57c58645714fdab8ed55da5d MD5 (patch-an) = 135b09a36c66aaf25a476dcb659efcf7 MD5 (patch-ao) = 98e2eb418ee7f5ad544c32c7d5569ea2 MD5 (patch-ap) = 99049fb6deb9bab8950723b7430a89a4 -MD5 (patch-aq) = fed44f408b8f42c808af1f896308d07d +MD5 (patch-aq) = b0a282a2efb91234aeddca67351f95a4 MD5 (patch-au) = aabad95304cea849e30389ad00e6d243 MD5 (patch-av) = b3f9909bd6a5cc387e929d16f89884c0 -MD5 (patch-ba) = fa984b71e26f7a9b32f9c1e38baaaa36 -MD5 (patch-bb) = bfcd6c515d2ab62c510bed6afceeedee diff --git a/security/ssh/patches/patch-aq b/security/ssh/patches/patch-aq index 1de53ceb568..0988e21039c 100644 --- a/security/ssh/patches/patch-aq +++ b/security/ssh/patches/patch-aq @@ -1,7 +1,7 @@ -$NetBSD: patch-aq,v 1.2 1999/05/26 15:35:43 tv Exp $ +$NetBSD: patch-aq,v 1.3 1999/08/17 15:24:42 sommerfeld Exp $ ---- newchannels.c.orig Wed May 12 13:19:27 1999 -+++ newchannels.c Sat May 15 04:31:04 1999 +--- newchannels.c.orig Wed May 12 07:19:27 1999 ++++ newchannels.c Tue Aug 17 10:49:25 1999 @@ -274,7 +274,7 @@ #include "authfd.h" #include "emulate.h" @@ -11,7 +11,20 @@ $NetBSD: patch-aq,v 1.2 1999/05/26 15:35:43 tv Exp $ #include <tcpd.h> #include <syslog.h> #ifdef NEED_SYS_SYSLOG_H -@@ -934,7 +934,7 @@ +@@ -922,6 +922,7 @@ + /* This is our fake X11 server socket. */ + if (FD_ISSET(ch->sock, readset)) + { ++ int on = 1; + debug("X11 connection requested."); + addrlen = sizeof(addr); + newsock = accept(ch->sock, &addr, &addrlen); +@@ -930,11 +931,12 @@ + error("accept: %.100s", strerror(errno)); + break; + } ++ setsockopt(newsock, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on)); + remote_hostname = get_remote_hostname(newsock); snprintf(buf, sizeof(buf), "X11 connection from %.200s port %d", remote_hostname, get_peer_port(newsock)); xfree(remote_hostname); @@ -20,7 +33,7 @@ $NetBSD: patch-aq,v 1.2 1999/05/26 15:35:43 tv Exp $ { struct request_info req; struct servent *serv; -@@ -986,7 +986,7 @@ +@@ -986,7 +988,7 @@ ch->listening_port, remote_hostname, get_peer_port(newsock)); xfree(remote_hostname); @@ -29,7 +42,23 @@ $NetBSD: patch-aq,v 1.2 1999/05/26 15:35:43 tv Exp $ { struct request_info req; struct servent *serv; -@@ -2412,6 +2412,10 @@ +@@ -1919,6 +1921,7 @@ + struct sockaddr_in sin; + char buf[255], *cp, *remote_host; + struct hostent *hp; ++ int on = 1; + + /* Get remote channel number. */ + remote_channel = packet_get_int(); +@@ -2110,6 +2113,7 @@ + + success: + /* We have successfully obtained a connection to the real X display. */ ++ setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &on, sizeof(on)); + + #if defined(O_NONBLOCK) && !defined(O_NONBLOCK_BROKEN) + (void)fcntl(sock, F_SETFL, O_NONBLOCK); +@@ -2412,6 +2416,10 @@ ssh-agent connections on your system */ old_umask = umask(S_IRUSR|S_IXUSR|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH); |