diff options
author | Damien Miller <djm@mindrot.org> | 2002-09-19 11:49:37 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2002-09-19 11:49:37 +1000 |
commit | e1383cee9d671906424797c084940b2d382f2813 (patch) | |
tree | 3e905a03f77414a7f09e63c009ee11edbbf43d52 /sshconnect.c | |
parent | f37e246f858cdd79be4f4e158b7b04778d1cb7e9 (diff) |
- stevesk@cvs.openbsd.org 2002/09/13 19:23:09
[channels.c sshconnect.c sshd.c]
remove use of SO_LINGER, it should not be needed. error check
SO_REUSEADDR. fixup comments. ok markus@
Diffstat (limited to 'sshconnect.c')
-rw-r--r-- | sshconnect.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/sshconnect.c b/sshconnect.c index 6004bf5e4..0cb824852 100644 --- a/sshconnect.c +++ b/sshconnect.c | |||
@@ -13,7 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | #include "includes.h" | 15 | #include "includes.h" |
16 | RCSID("$OpenBSD: sshconnect.c,v 1.133 2002/07/29 18:57:30 markus Exp $"); | 16 | RCSID("$OpenBSD: sshconnect.c,v 1.134 2002/09/13 19:23:09 stevesk Exp $"); |
17 | 17 | ||
18 | #include <openssl/bn.h> | 18 | #include <openssl/bn.h> |
19 | 19 | ||
@@ -229,7 +229,6 @@ ssh_connect(const char *host, struct sockaddr_storage * hostaddr, | |||
229 | int sock = -1, attempt; | 229 | int sock = -1, attempt; |
230 | char ntop[NI_MAXHOST], strport[NI_MAXSERV]; | 230 | char ntop[NI_MAXHOST], strport[NI_MAXSERV]; |
231 | struct addrinfo hints, *ai, *aitop; | 231 | struct addrinfo hints, *ai, *aitop; |
232 | struct linger linger; | ||
233 | struct servent *sp; | 232 | struct servent *sp; |
234 | /* | 233 | /* |
235 | * Did we get only other errors than "Connection refused" (which | 234 | * Did we get only other errors than "Connection refused" (which |
@@ -330,15 +329,6 @@ ssh_connect(const char *host, struct sockaddr_storage * hostaddr, | |||
330 | 329 | ||
331 | debug("Connection established."); | 330 | debug("Connection established."); |
332 | 331 | ||
333 | /* | ||
334 | * Set socket options. We would like the socket to disappear as soon | ||
335 | * as it has been closed for whatever reason. | ||
336 | */ | ||
337 | /* setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (void *)&on, sizeof(on)); */ | ||
338 | linger.l_onoff = 1; | ||
339 | linger.l_linger = 5; | ||
340 | setsockopt(sock, SOL_SOCKET, SO_LINGER, (void *)&linger, sizeof(linger)); | ||
341 | |||
342 | /* Set keepalives if requested. */ | 332 | /* Set keepalives if requested. */ |
343 | if (options.keepalives && | 333 | if (options.keepalives && |
344 | setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, (void *)&on, | 334 | setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, (void *)&on, |