diff options
-rw-r--r-- | channels.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/channels.c b/channels.c index 07dc9577a..c2706ace7 100644 --- a/channels.c +++ b/channels.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: channels.c,v 1.376 2017/10/25 00:15:35 djm Exp $ */ | 1 | /* $OpenBSD: channels.c,v 1.377 2017/12/05 01:30:19 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -3351,7 +3351,8 @@ channel_setup_fwd_listener_tcpip(struct ssh *ssh, int type, | |||
3351 | sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); | 3351 | sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); |
3352 | if (sock < 0) { | 3352 | if (sock < 0) { |
3353 | /* this is no error since kernel may not support ipv6 */ | 3353 | /* this is no error since kernel may not support ipv6 */ |
3354 | verbose("socket: %.100s", strerror(errno)); | 3354 | verbose("socket [%s]:%s: %.100s", ntop, strport, |
3355 | strerror(errno)); | ||
3355 | continue; | 3356 | continue; |
3356 | } | 3357 | } |
3357 | 3358 | ||
@@ -3369,9 +3370,11 @@ channel_setup_fwd_listener_tcpip(struct ssh *ssh, int type, | |||
3369 | * already bound | 3370 | * already bound |
3370 | */ | 3371 | */ |
3371 | if (!ai->ai_next) | 3372 | if (!ai->ai_next) |
3372 | error("bind: %.100s", strerror(errno)); | 3373 | error("bind [%s]:%s: %.100s", |
3374 | ntop, strport, strerror(errno)); | ||
3373 | else | 3375 | else |
3374 | verbose("bind: %.100s", strerror(errno)); | 3376 | verbose("bind [%s]:%s: %.100s", |
3377 | ntop, strport, strerror(errno)); | ||
3375 | 3378 | ||
3376 | close(sock); | 3379 | close(sock); |
3377 | continue; | 3380 | continue; |
@@ -3379,6 +3382,8 @@ channel_setup_fwd_listener_tcpip(struct ssh *ssh, int type, | |||
3379 | /* Start listening for connections on the socket. */ | 3382 | /* Start listening for connections on the socket. */ |
3380 | if (listen(sock, SSH_LISTEN_BACKLOG) < 0) { | 3383 | if (listen(sock, SSH_LISTEN_BACKLOG) < 0) { |
3381 | error("listen: %.100s", strerror(errno)); | 3384 | error("listen: %.100s", strerror(errno)); |
3385 | error("listen [%s]:%s: %.100s", ntop, strport, | ||
3386 | strerror(errno)); | ||
3382 | close(sock); | 3387 | close(sock); |
3383 | continue; | 3388 | continue; |
3384 | } | 3389 | } |