diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2001-01-11 06:20:23 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2001-01-11 06:20:23 +0000 |
commit | 2f959b4cd1d1afcd241d7ffa06a34646c0c89969 (patch) | |
tree | a83ffc7dd3f484af4debdad46c5de25e985bf4ad /packet.c | |
parent | fd9885e3264ea16c75b61812d17ed64ca8dfd308 (diff) |
20010112
- (bal) OpenBSD Sync
- markus@cvs.openbsd.org 2001/01/10 22:56:22
[bufaux.h bufaux.c sftp-server.c sftp.h getput.h]
cleanup sftp-server implementation:
add buffer_get_int64, buffer_put_int64, GET_64BIT, PUT_64BIT
parse SSH2_FILEXFER_ATTR_EXTENDED
send SSH2_FX_EOF if readdir returns no more entries
reply to SSH2_FXP_EXTENDED message
use #defines from the draft
move #definations to sftp.h
more info:
http://www.ietf.org/internet-drafts/draft-ietf-secsh-filexfer-00.txt
- markus@cvs.openbsd.org 2001/01/10 19:43:20
[sshd.c]
XXX - generate_empheral_server_key() is not safe against races,
because it calls log()
- markus@cvs.openbsd.org 2001/01/09 21:19:50
[packet.c]
allow TCP_NDELAY for ipv6; from netbsd via itojun@
Diffstat (limited to 'packet.c')
-rw-r--r-- | packet.c | 19 |
1 files changed, 10 insertions, 9 deletions
@@ -37,7 +37,7 @@ | |||
37 | */ | 37 | */ |
38 | 38 | ||
39 | #include "includes.h" | 39 | #include "includes.h" |
40 | RCSID("$OpenBSD: packet.c,v 1.41 2001/01/02 20:41:02 markus Exp $"); | 40 | RCSID("$OpenBSD: packet.c,v 1.42 2001/01/09 21:19:50 markus Exp $"); |
41 | 41 | ||
42 | #include "xmalloc.h" | 42 | #include "xmalloc.h" |
43 | #include "buffer.h" | 43 | #include "buffer.h" |
@@ -1247,25 +1247,26 @@ packet_set_interactive(int interactive, int keepalives) | |||
1247 | error("setsockopt SO_KEEPALIVE: %.100s", strerror(errno)); | 1247 | error("setsockopt SO_KEEPALIVE: %.100s", strerror(errno)); |
1248 | } | 1248 | } |
1249 | /* | 1249 | /* |
1250 | * IPTOS_LOWDELAY, TCP_NODELAY and IPTOS_THROUGHPUT are IPv4 only | 1250 | * IPTOS_LOWDELAY and IPTOS_THROUGHPUT are IPv4 only |
1251 | */ | 1251 | */ |
1252 | if (!packet_connection_is_ipv4()) | ||
1253 | return; | ||
1254 | if (interactive) { | 1252 | if (interactive) { |
1255 | /* | 1253 | /* |
1256 | * Set IP options for an interactive connection. Use | 1254 | * Set IP options for an interactive connection. Use |
1257 | * IPTOS_LOWDELAY and TCP_NODELAY. | 1255 | * IPTOS_LOWDELAY and TCP_NODELAY. |
1258 | */ | 1256 | */ |
1259 | #if defined(IP_TOS) && !defined(IP_TOS_IS_BROKEN) | 1257 | #if defined(IP_TOS) && !defined(IP_TOS_IS_BROKEN) |
1260 | int lowdelay = IPTOS_LOWDELAY; | 1258 | if (packet_connection_is_ipv4()) { |
1261 | if (setsockopt(connection_in, IPPROTO_IP, IP_TOS, (void *) &lowdelay, | 1259 | int lowdelay = IPTOS_LOWDELAY; |
1262 | sizeof(lowdelay)) < 0) | 1260 | if (setsockopt(connection_in, IPPROTO_IP, IP_TOS, |
1263 | error("setsockopt IPTOS_LOWDELAY: %.100s", strerror(errno)); | 1261 | (void *) &lowdelay, sizeof(lowdelay)) < 0) |
1262 | error("setsockopt IPTOS_LOWDELAY: %.100s", | ||
1263 | strerror(errno)); | ||
1264 | } | ||
1264 | #endif | 1265 | #endif |
1265 | if (setsockopt(connection_in, IPPROTO_TCP, TCP_NODELAY, (void *) &on, | 1266 | if (setsockopt(connection_in, IPPROTO_TCP, TCP_NODELAY, (void *) &on, |
1266 | sizeof(on)) < 0) | 1267 | sizeof(on)) < 0) |
1267 | error("setsockopt TCP_NODELAY: %.100s", strerror(errno)); | 1268 | error("setsockopt TCP_NODELAY: %.100s", strerror(errno)); |
1268 | } else { | 1269 | } else if (packet_connection_is_ipv4()) { |
1269 | /* | 1270 | /* |
1270 | * Set IP options for a non-interactive connection. Use | 1271 | * Set IP options for a non-interactive connection. Use |
1271 | * IPTOS_THROUGHPUT. | 1272 | * IPTOS_THROUGHPUT. |