mirror of https://github.com/wolfSSL/wolfssh.git
The disconnect flag gated wolfSSH_stream_read() and wolfSSH_stream_send(), which is the client-side API. wolfsshd and echoserver drive their channels through the channel-id calls, so the daemon was never gated at all. - New SendAfterDisconnect() helper, used by the six send entry points: stream_send, stream_exit, ChannelIdSend, ChannelIdSendExt, extended_data_send and global_request. - Reads stay open, since data that arrived before the disconnect is still the caller's. wolfSSH_stream_read() drains its buffer and reports WS_DISCONNECT only once it runs dry. - wolfSSH_worker() stays ungated; the shutdown paths still pump it. - ssh.h and internal.h describe the split. - regress.c: buffered data survives the disconnect, and every send call refuses without a byte leaving the session. Issue: F-8837 Every public send call means every one: the channel-pointer sends (wolfSSH_ChannelSend, wolfSSH_ChannelSendExt, wolfSSH_ChannelExit), the forwarding requests and both wolfSSH_ChannelFwdNew* opens carry the gate too, and none of them had a message-filter backstop. ChannelCreditWindow() parks its credit rather than sending. The reads that drain what arrived before the disconnect credit the window for the bytes taken, and that credit went straight to the transport: each drain put a CHANNEL_WINDOW_ADJUST on the wire after the session was over, and a failing send replaced the byte count already copied for the caller. |
||
|---|---|---|
| .. | ||
| agent.h | ||
| certman.h | ||
| certs_test.h | ||
| error.h | ||
| include.am | ||
| internal.h | ||
| keygen.h | ||
| log.h | ||
| misc.h | ||
| ossh.h | ||
| port.h | ||
| settings.h | ||
| ssh.h | ||
| test.h | ||
| version.h | ||
| version.h.in | ||
| visibility.h | ||
| wolfscp.h | ||
| wolfsftp.h | ||