summaryrefslogtreecommitdiff
path: root/serverloop.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2002-09-22 01:26:27 +1000
committerDamien Miller <djm@mindrot.org>2002-09-22 01:26:27 +1000
commit16aed055787953630641d7b0aa4c1f6cf3a6269f (patch)
tree23752b5c2f78b28ef51f27175a95d77b81396d6d /serverloop.c
parent2138d152b23ab6f5f1aa127fc8959688c4fb6ce0 (diff)
- stevesk@cvs.openbsd.org 2002/09/19 16:03:15
[serverloop.c] log IP address also; ok markus@
Diffstat (limited to 'serverloop.c')
-rw-r--r--serverloop.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/serverloop.c b/serverloop.c
index 912f62501..5112de680 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -35,13 +35,14 @@
35 */ 35 */
36 36
37#include "includes.h" 37#include "includes.h"
38RCSID("$OpenBSD: serverloop.c,v 1.103 2002/06/24 14:33:27 markus Exp $"); 38RCSID("$OpenBSD: serverloop.c,v 1.104 2002/09/19 16:03:15 stevesk Exp $");
39 39
40#include "xmalloc.h" 40#include "xmalloc.h"
41#include "packet.h" 41#include "packet.h"
42#include "buffer.h" 42#include "buffer.h"
43#include "log.h" 43#include "log.h"
44#include "servconf.h" 44#include "servconf.h"
45#include "canohost.h"
45#include "sshpty.h" 46#include "sshpty.h"
46#include "channels.h" 47#include "channels.h"
47#include "compat.h" 48#include "compat.h"
@@ -347,14 +348,17 @@ process_input(fd_set * readset)
347 if (FD_ISSET(connection_in, readset)) { 348 if (FD_ISSET(connection_in, readset)) {
348 len = read(connection_in, buf, sizeof(buf)); 349 len = read(connection_in, buf, sizeof(buf));
349 if (len == 0) { 350 if (len == 0) {
350 verbose("Connection closed by remote host."); 351 verbose("Connection closed by %.100s",
352 get_remote_ipaddr());
351 connection_closed = 1; 353 connection_closed = 1;
352 if (compat20) 354 if (compat20)
353 return; 355 return;
354 fatal_cleanup(); 356 fatal_cleanup();
355 } else if (len < 0) { 357 } else if (len < 0) {
356 if (errno != EINTR && errno != EAGAIN) { 358 if (errno != EINTR && errno != EAGAIN) {
357 verbose("Read error from remote host: %.100s", strerror(errno)); 359 verbose("Read error from remote host "
360 "%.100s: %.100s",
361 get_remote_ipaddr(), strerror(errno));
358 fatal_cleanup(); 362 fatal_cleanup();
359 } 363 }
360 } else { 364 } else {