diff options
Diffstat (limited to 'sshd.c')
-rw-r--r-- | sshd.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -42,7 +42,7 @@ | |||
42 | */ | 42 | */ |
43 | 43 | ||
44 | #include "includes.h" | 44 | #include "includes.h" |
45 | RCSID("$OpenBSD: sshd.c,v 1.285 2004/02/05 05:37:17 dtucker Exp $"); | 45 | RCSID("$OpenBSD: sshd.c,v 1.286 2004/02/23 12:02:33 markus Exp $"); |
46 | 46 | ||
47 | #include <openssl/dh.h> | 47 | #include <openssl/dh.h> |
48 | #include <openssl/bn.h> | 48 | #include <openssl/bn.h> |
@@ -1151,6 +1151,11 @@ main(int ac, char **av) | |||
1151 | verbose("socket: %.100s", strerror(errno)); | 1151 | verbose("socket: %.100s", strerror(errno)); |
1152 | continue; | 1152 | continue; |
1153 | } | 1153 | } |
1154 | if (fcntl(listen_sock, F_SETFL, O_NONBLOCK) < 0) { | ||
1155 | error("listen_sock O_NONBLOCK: %s", strerror(errno)); | ||
1156 | close(listen_sock); | ||
1157 | continue; | ||
1158 | } | ||
1154 | /* | 1159 | /* |
1155 | * Set socket options. | 1160 | * Set socket options. |
1156 | * Allow local port reuse in TIME_WAIT. | 1161 | * Allow local port reuse in TIME_WAIT. |
@@ -1290,6 +1295,11 @@ main(int ac, char **av) | |||
1290 | error("accept: %.100s", strerror(errno)); | 1295 | error("accept: %.100s", strerror(errno)); |
1291 | continue; | 1296 | continue; |
1292 | } | 1297 | } |
1298 | if (fcntl(newsock, F_SETFL, 0) < 0) { | ||
1299 | error("newsock del O_NONBLOCK: %s", strerror(errno)); | ||
1300 | close(newsock); | ||
1301 | continue; | ||
1302 | } | ||
1293 | if (drop_connection(startups) == 1) { | 1303 | if (drop_connection(startups) == 1) { |
1294 | debug("drop connection #%d", startups); | 1304 | debug("drop connection #%d", startups); |
1295 | close(newsock); | 1305 | close(newsock); |