summaryrefslogtreecommitdiff
path: root/sshconnect.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2002-09-19 11:49:37 +1000
committerDamien Miller <djm@mindrot.org>2002-09-19 11:49:37 +1000
commite1383cee9d671906424797c084940b2d382f2813 (patch)
tree3e905a03f77414a7f09e63c009ee11edbbf43d52 /sshconnect.c
parentf37e246f858cdd79be4f4e158b7b04778d1cb7e9 (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.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/sshconnect.c b/sshconnect.c
index 6004bf5e..0cb82485 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -13,7 +13,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: sshconnect.c,v 1.133 2002/07/29 18:57:30 markus Exp $");
+RCSID("$OpenBSD: sshconnect.c,v 1.134 2002/09/13 19:23:09 stevesk Exp $");
#include <openssl/bn.h>
@@ -229,7 +229,6 @@ ssh_connect(const char *host, struct sockaddr_storage * hostaddr,
int sock = -1, attempt;
char ntop[NI_MAXHOST], strport[NI_MAXSERV];
struct addrinfo hints, *ai, *aitop;
- struct linger linger;
struct servent *sp;
/*
* Did we get only other errors than "Connection refused" (which
@@ -330,15 +329,6 @@ ssh_connect(const char *host, struct sockaddr_storage * hostaddr,
debug("Connection established.");
- /*
- * Set socket options. We would like the socket to disappear as soon
- * as it has been closed for whatever reason.
- */
- /* setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (void *)&on, sizeof(on)); */
- linger.l_onoff = 1;
- linger.l_linger = 5;
- setsockopt(sock, SOL_SOCKET, SO_LINGER, (void *)&linger, sizeof(linger));
-
/* Set keepalives if requested. */
if (options.keepalives &&
setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, (void *)&on,