Skip to content

RxD Fix#874

Open
ejohnstown wants to merge 2 commits intowolfSSL:masterfrom
ejohnstown:rxd-fix
Open

RxD Fix#874
ejohnstown wants to merge 2 commits intowolfSSL:masterfrom
ejohnstown:rxd-fix

Conversation

@ejohnstown
Copy link
Contributor

@ejohnstown ejohnstown commented Feb 2, 2026

  1. Forwarding fixes in echoserver. (Really a general channel issue.)
  2. Agent fixes in echoserver.

1. When wolfSSH_worker() receives channel data, it should set the
   channelId for the data. It was not happening. Change the check for
   WS_SUCCESS to also check for WS_CHAN_RXD.
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes handling around “channel RX’d” (WS_CHAN_RXD) and agent setup paths, primarily to improve forwarding behavior in the echoserver and make agent-related code compile cleanly.

Changes:

  • Treat WS_CHAN_RXD as a successful outcome for returning lastRxId from wolfSSH_worker().
  • Silence unused-parameter warnings in agent stubs.
  • Fix echoserver agent UNIX-socket setup flow so it proceeds correctly after snprintf() and simplifies the socket() error assignment.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/ssh.c Returns channelId not only on WS_SUCCESS but also on WS_CHAN_RXD so callers can identify the channel that received data.
src/agent.c Adds WOLFSSH_UNUSED(agent) to avoid unused-parameter warnings when logging is compiled out.
examples/echoserver/echoserver.c Corrects agent local setup flow after snprintf() and adjusts UNIX-socket bind/setup logic.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

1. Fix a couple unused variable warnings.
2. In wolfSSH_AGENT_DefaultActions(), fix comparison to the result of
   snprintf() treating normal result as an error. Reset the return code
   for the error state of the socket() command. Remove the size variable
   and just use sizeof() the sockaddr_un. Better cleanup of agent
   startup failures.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants