Commit 628fd6a0 authored by Niels Möller's avatar Niels Möller

Fixed handling of MSG_CHANNEL_OPEN_FAILURE on gateway channels.

parent 92755bd0
2013-09-02 Niels Möller <nisse@lysator.liu.se>
* src/gateway_channel.c (do_kill_gateway_channel): Fixed handling
of MSG_CHANNEL_OPEN_FAILURE.
2013-06-27 Niels Möller <nisse@lysator.liu.se> 2013-06-27 Niels Möller <nisse@lysator.liu.se>
* src/testsuite/prgrp-timeout.c (handle_sigchld): Declare argument * src/testsuite/prgrp-timeout.c (handle_sigchld): Declare argument
......
...@@ -69,7 +69,7 @@ do_kill_gateway_channel(struct resource *s) ...@@ -69,7 +69,7 @@ do_kill_gateway_channel(struct resource *s)
{ {
/* When the kill method is called because a gateway client /* When the kill method is called because a gateway client
disconnects, then to tear down the corrsponding channel disconnects, then to tear down the corrsponding channel
tot he server, three are possible states we need to to the server, there are three possible states we need to
handle: handle:
1. The channel is fully open. Then call channel_close to 1. The channel is fully open. Then call channel_close to
...@@ -80,7 +80,7 @@ do_kill_gateway_channel(struct resource *s) ...@@ -80,7 +80,7 @@ do_kill_gateway_channel(struct resource *s)
client disappears before we get any reply from the client disappears before we get any reply from the
server. Then we can't send CHANNEL_CLOSE now. Instead, server. Then we can't send CHANNEL_CLOSE now. Instead,
do_gateway_channel_event checks for this case and do_gateway_channel_event checks for this case and
closes the channel as soon as a response to closes the channel as soon as a we get the response to
CHANNEL_OPEN_CONFIRMATION. CHANNEL_OPEN_CONFIRMATION.
3. The server requested a CHANNEL_OPEN, which was forwarded, 3. The server requested a CHANNEL_OPEN, which was forwarded,
...@@ -100,8 +100,11 @@ do_kill_gateway_channel(struct resource *s) ...@@ -100,8 +100,11 @@ do_kill_gateway_channel(struct resource *s)
/* Case 2 above. Do nothing now. */ /* Case 2 above. Do nothing now. */
break; break;
case CHANNEL_ALLOC_SENT_OPEN: case CHANNEL_ALLOC_SENT_OPEN:
/* Case 3 above */ /* Case 3 above. Send deny message on originating
assert(self->info); channel, unless we already did that. We can also
enter this case after the "normal" handling in
CHANNEL_EVENT_DENY. */
if (self->info)
channel_open_deny(self->info, SSH_OPEN_CONNECT_FAILED, channel_open_deny(self->info, SSH_OPEN_CONNECT_FAILED,
"Refused by server"); "Refused by server");
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment