diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | sshd.c | 13 |
2 files changed, 11 insertions, 8 deletions
@@ -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 | ||
8 | 20050524 | 12 | 20050524 |
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 $ |
@@ -42,7 +42,7 @@ | |||
42 | */ | 42 | */ |
43 | 43 | ||
44 | #include "includes.h" | 44 | #include "includes.h" |
45 | RCSID("$OpenBSD: sshd.c,v 1.308 2005/02/08 22:24:57 dtucker Exp $"); | 45 | RCSID("$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 | ||