diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2001-01-09 21:19:51 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2001-01-09 21:19:51 +0000 |
commit | a0d0a9ed914af58a5e794488ba94ecba0c149626 (patch) | |
tree | 2bcd84bf4af312db7baa112658c55cbf7adf796f /usr.bin | |
parent | a86702a082bf3366aad4ec247151e0c6e2d61864 (diff) |
allow TCP_NDELAY for ipv6; from netbsd via itojun@
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/packet.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/usr.bin/ssh/packet.c b/usr.bin/ssh/packet.c index e5d87eff6bc..1f81591f072 100644 --- a/usr.bin/ssh/packet.c +++ b/usr.bin/ssh/packet.c @@ -37,7 +37,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: packet.c,v 1.41 2001/01/02 20:41:02 markus Exp $"); +RCSID("$OpenBSD: packet.c,v 1.42 2001/01/09 21:19:50 markus Exp $"); #include "xmalloc.h" #include "buffer.h" @@ -1247,23 +1247,24 @@ packet_set_interactive(int interactive, int keepalives) error("setsockopt SO_KEEPALIVE: %.100s", strerror(errno)); } /* - * IPTOS_LOWDELAY, TCP_NODELAY and IPTOS_THROUGHPUT are IPv4 only + * IPTOS_LOWDELAY and IPTOS_THROUGHPUT are IPv4 only */ - if (!packet_connection_is_ipv4()) - return; if (interactive) { /* * Set IP options for an interactive connection. Use * IPTOS_LOWDELAY and TCP_NODELAY. */ - int lowdelay = IPTOS_LOWDELAY; - if (setsockopt(connection_in, IPPROTO_IP, IP_TOS, (void *) &lowdelay, - sizeof(lowdelay)) < 0) - error("setsockopt IPTOS_LOWDELAY: %.100s", strerror(errno)); + if (packet_connection_is_ipv4()) { + int lowdelay = IPTOS_LOWDELAY; + if (setsockopt(connection_in, IPPROTO_IP, IP_TOS, + (void *) &lowdelay, sizeof(lowdelay)) < 0) + error("setsockopt IPTOS_LOWDELAY: %.100s", + strerror(errno)); + } if (setsockopt(connection_in, IPPROTO_TCP, TCP_NODELAY, (void *) &on, sizeof(on)) < 0) error("setsockopt TCP_NODELAY: %.100s", strerror(errno)); - } else { + } else if (packet_connection_is_ipv4()) { /* * Set IP options for a non-interactive connection. Use * IPTOS_THROUGHPUT. |