summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2005-05-26 11:59:32 +1000
committerDamien Miller <djm@mindrot.org>2005-05-26 11:59:32 +1000
commit4f1d6b2c112be24f6ecfcb81b56f0180ec76ea66 (patch)
tree28a4d3a91d5c583e114bbbceea948017efc1f74a
parent9278ffaf71c035fe5a50c9704dda36d2f2fd7a06 (diff)
- djm@cvs.openbsd.org 2005/04/06 09:43:59
[sshd.c] avoid harmless logspam by not performing setsockopt() on non-socket; ok markus@
-rw-r--r--ChangeLog6
-rw-r--r--sshd.c13
2 files changed, 11 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 354bffc35..32212bcbf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,10 @@
4 - (djm) OpenBSD CVS Sync 4 - (djm) OpenBSD CVS Sync
5 - otto@cvs.openbsd.org 2005/04/05 13:45:31 5 - otto@cvs.openbsd.org 2005/04/05 13:45:31
6 [ssh-keygen.c] 6 [ssh-keygen.c]
7 - djm@cvs.openbsd.org 2005/04/06 09:43:59
8 [sshd.c]
9 avoid harmless logspam by not performing setsockopt() on non-socket;
10 ok markus@
7 11
820050524 1220050524
9 - (djm) [contrib/caldera/openssh.spec contrib/redhat/openssh.spec] 13 - (djm) [contrib/caldera/openssh.spec contrib/redhat/openssh.spec]
@@ -2503,4 +2507,4 @@
2503 - (djm) Trim deprecated options from INSTALL. Mention UsePAM 2507 - (djm) Trim deprecated options from INSTALL. Mention UsePAM
2504 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu 2508 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
2505 2509
2506$Id: ChangeLog,v 1.3762 2005/05/26 01:59:06 djm Exp $ 2510$Id: ChangeLog,v 1.3763 2005/05/26 01:59:32 djm Exp $
diff --git a/sshd.c b/sshd.c
index b3fcc6964..7ee2dd686 100644
--- a/sshd.c
+++ b/sshd.c
@@ -42,7 +42,7 @@
42 */ 42 */
43 43
44#include "includes.h" 44#include "includes.h"
45RCSID("$OpenBSD: sshd.c,v 1.308 2005/02/08 22:24:57 dtucker Exp $"); 45RCSID("$OpenBSD: sshd.c,v 1.309 2005/04/06 09:43:59 djm Exp $");
46 46
47#include <openssl/dh.h> 47#include <openssl/dh.h>
48#include <openssl/bn.h> 48#include <openssl/bn.h>
@@ -1615,18 +1615,17 @@ main(int ac, char **av)
1615 signal(SIGCHLD, SIG_DFL); 1615 signal(SIGCHLD, SIG_DFL);
1616 signal(SIGINT, SIG_DFL); 1616 signal(SIGINT, SIG_DFL);
1617 1617
1618 /* Set SO_KEEPALIVE if requested. */
1619 if (options.tcp_keep_alive &&
1620 setsockopt(sock_in, SOL_SOCKET, SO_KEEPALIVE, &on,
1621 sizeof(on)) < 0)
1622 error("setsockopt SO_KEEPALIVE: %.100s", strerror(errno));
1623
1624 /* 1618 /*
1625 * Register our connection. This turns encryption off because we do 1619 * Register our connection. This turns encryption off because we do
1626 * not have a key. 1620 * not have a key.
1627 */ 1621 */
1628 packet_set_connection(sock_in, sock_out); 1622 packet_set_connection(sock_in, sock_out);
1629 1623
1624 /* Set SO_KEEPALIVE if requested. */
1625 if (options.tcp_keep_alive && packet_connection_is_on_socket() &&
1626 setsockopt(sock_in, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof(on)) < 0)
1627 error("setsockopt SO_KEEPALIVE: %.100s", strerror(errno));
1628
1630 remote_port = get_remote_port(); 1629 remote_port = get_remote_port();
1631 remote_ip = get_remote_ipaddr(); 1630 remote_ip = get_remote_ipaddr();
1632 1631