diff options
Diffstat (limited to 'serverloop.c')
-rw-r--r-- | serverloop.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/serverloop.c b/serverloop.c index 306ac36be..4d0c0edb1 100644 --- a/serverloop.c +++ b/serverloop.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: serverloop.c,v 1.178 2015/02/20 22:17:21 djm Exp $ */ | 1 | /* $OpenBSD: serverloop.c,v 1.179 2015/11/28 06:41:03 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 |
@@ -1265,7 +1265,8 @@ server_input_global_request(int type, u_int32_t seq, void *ctxt) | |||
1265 | free(fwd.listen_host); | 1265 | free(fwd.listen_host); |
1266 | if ((resp = sshbuf_new()) == NULL) | 1266 | if ((resp = sshbuf_new()) == NULL) |
1267 | fatal("%s: sshbuf_new", __func__); | 1267 | fatal("%s: sshbuf_new", __func__); |
1268 | if ((r = sshbuf_put_u32(resp, allocated_listen_port)) != 0) | 1268 | if (allocated_listen_port != 0 && |
1269 | (r = sshbuf_put_u32(resp, allocated_listen_port)) != 0) | ||
1269 | fatal("%s: sshbuf_put_u32: %s", __func__, ssh_err(r)); | 1270 | fatal("%s: sshbuf_put_u32: %s", __func__, ssh_err(r)); |
1270 | } else if (strcmp(rtype, "cancel-tcpip-forward") == 0) { | 1271 | } else if (strcmp(rtype, "cancel-tcpip-forward") == 0) { |
1271 | struct Forward fwd; | 1272 | struct Forward fwd; |