summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--channels.c12
2 files changed, 14 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index d79457079..189b0dbcf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,10 @@
8 - stevesk@cvs.openbsd.org 2001/12/06 18:09:23 8 - stevesk@cvs.openbsd.org 2001/12/06 18:09:23
9 [channels.c session.c] 9 [channels.c session.c]
10 strncpy->strlcpy. remaining strncpy's are necessary. ok markus@ 10 strncpy->strlcpy. remaining strncpy's are necessary. ok markus@
11 - stevesk@cvs.openbsd.org 2001/12/06 18:20:32
12 [channels.c]
13 disable nagle for X11 fake server and client TCPs. from netbsd.
14 ok markus@
11 15
1220011206 1620011206
13 - (bal) OpenBSD CVS Sync 17 - (bal) OpenBSD CVS Sync
@@ -7005,4 +7009,4 @@
7005 - Wrote replacements for strlcpy and mkdtemp 7009 - Wrote replacements for strlcpy and mkdtemp
7006 - Released 1.0pre1 7010 - Released 1.0pre1
7007 7011
7008$Id: ChangeLog,v 1.1690 2001/12/07 17:26:48 mouring Exp $ 7012$Id: ChangeLog,v 1.1691 2001/12/07 17:28:34 mouring Exp $
diff --git a/channels.c b/channels.c
index 3fe619f48..694b7cc78 100644
--- a/channels.c
+++ b/channels.c
@@ -39,7 +39,7 @@
39 */ 39 */
40 40
41#include "includes.h" 41#include "includes.h"
42RCSID("$OpenBSD: channels.c,v 1.145 2001/12/06 18:09:23 stevesk Exp $"); 42RCSID("$OpenBSD: channels.c,v 1.146 2001/12/06 18:20:32 stevesk Exp $");
43 43
44#include "ssh.h" 44#include "ssh.h"
45#include "ssh1.h" 45#include "ssh1.h"
@@ -993,7 +993,7 @@ channel_post_x11_listener(Channel *c, fd_set * readset, fd_set * writeset)
993{ 993{
994 Channel *nc; 994 Channel *nc;
995 struct sockaddr addr; 995 struct sockaddr addr;
996 int newsock; 996 int newsock, on = 1;
997 socklen_t addrlen; 997 socklen_t addrlen;
998 char buf[16384], *remote_ipaddr; 998 char buf[16384], *remote_ipaddr;
999 int remote_port; 999 int remote_port;
@@ -1006,6 +1006,10 @@ channel_post_x11_listener(Channel *c, fd_set * readset, fd_set * writeset)
1006 error("accept: %.100s", strerror(errno)); 1006 error("accept: %.100s", strerror(errno));
1007 return; 1007 return;
1008 } 1008 }
1009 if (setsockopt(newsock, IPPROTO_TCP, TCP_NODELAY, &on,
1010 sizeof on) == -1)
1011 error("setsockopt TCP_NODELAY: %.100s",
1012 strerror(errno));
1009 remote_ipaddr = get_peer_ipaddr(newsock); 1013 remote_ipaddr = get_peer_ipaddr(newsock);
1010 remote_port = get_peer_port(newsock); 1014 remote_port = get_peer_port(newsock);
1011 snprintf(buf, sizeof buf, "X11 connection from %.200s port %d", 1015 snprintf(buf, sizeof buf, "X11 connection from %.200s port %d",
@@ -2567,7 +2571,7 @@ connect_local_xsocket(u_int dnr)
2567int 2571int
2568x11_connect_display(void) 2572x11_connect_display(void)
2569{ 2573{
2570 int display_number, sock = 0; 2574 int display_number, sock = 0, on = 1;
2571 const char *display; 2575 const char *display;
2572 char buf[1024], *cp; 2576 char buf[1024], *cp;
2573 struct addrinfo hints, *ai, *aitop; 2577 struct addrinfo hints, *ai, *aitop;
@@ -2655,6 +2659,8 @@ x11_connect_display(void)
2655 strerror(errno)); 2659 strerror(errno));
2656 return -1; 2660 return -1;
2657 } 2661 }
2662 if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, &on, sizeof on) == -1)
2663 error("setsockopt TCP_NODELAY: %.100s", strerror(errno));
2658 return sock; 2664 return sock;
2659} 2665}
2660 2666