From 677257fe07dd2b9a58817e1d42fc2c25bb618a4d Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Fri, 17 Jun 2005 12:55:03 +1000 Subject: - markus@cvs.openbsd.org 2005/06/16 08:00:00 [canohost.c channels.c sshd.c] don't exit if getpeername fails for forwarded ports; bugzilla #1054; ok djm --- sshd.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'sshd.c') diff --git a/sshd.c b/sshd.c index 7ee2dd686..ed4158801 100644 --- a/sshd.c +++ b/sshd.c @@ -42,7 +42,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: sshd.c,v 1.309 2005/04/06 09:43:59 djm Exp $"); +RCSID("$OpenBSD: sshd.c,v 1.310 2005/06/16 08:00:00 markus Exp $"); #include #include @@ -1626,7 +1626,10 @@ main(int ac, char **av) setsockopt(sock_in, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof(on)) < 0) error("setsockopt SO_KEEPALIVE: %.100s", strerror(errno)); - remote_port = get_remote_port(); + if ((remote_port = get_remote_port()) < 0) { + debug("get_remote_port failed"); + cleanup_exit(255); + } remote_ip = get_remote_ipaddr(); #ifdef SSH_AUDIT_EVENTS -- cgit v1.2.3