equal
deleted
inserted
replaced
|
1 # |
|
2 # Fix possible hang on closed output. |
|
3 # |
|
4 # When there is a connectivity problem between the server and the client |
|
5 # (network outage, server crash or reboot), the client indefinitely hangs. |
|
6 # |
|
7 # This patch fixes the issue by checking ssh_packet_write_poll return value |
|
8 # in ssh_packet_write_wait and passing it through. |
|
9 # |
|
10 # The (updated) patch has been accepted upstream and will be part of 7.2 |
|
11 # https://github.com/openssh/openssh-portable/commit/8408218 |
|
12 # |
|
13 diff -pur old/packet.c new/packet.c |
|
14 --- old/packet.c |
|
15 +++ new/packet.c |
|
16 @@ -2040,7 +2040,8 @@ ssh_packet_write_wait(struct ssh *ssh) |
|
17 NFDBITS), sizeof(fd_mask)); |
|
18 if (setp == NULL) |
|
19 return SSH_ERR_ALLOC_FAIL; |
|
20 - ssh_packet_write_poll(ssh); |
|
21 + if ((r = ssh_packet_write_poll(ssh)) != 0) |
|
22 + return r; |
|
23 while (ssh_packet_have_data_to_write(ssh)) { |
|
24 memset(setp, 0, howmany(state->connection_out + 1, |
|
25 NFDBITS) * sizeof(fd_mask)); |