Skip to content

fwd: drop the declarations with no definition - #1210

Merged
philljj merged 1 commit into
wolfSSL:masterfrom
ejohnstown:ccb-phase1-6
Aug 28, 2026
Merged

fwd: drop the declarations with no definition#1210
philljj merged 1 commit into
wolfSSL:masterfrom
ejohnstown:ccb-phase1-6

Conversation

@ejohnstown

Copy link
Copy Markdown
Contributor

wolfSSH_CTX_SetFwdEnable() and wolfSSH_SetFwdEnable() are declared in
ssh.h and defined nowhere, so calling either is a link error rather
than a way to gate forwarding. Nothing can depend on them today.

  • delete both declarations
  • say in the header that the WS_CallbackFwdIO passed to
    wolfSSH_CTX_SetFwdCb() is stored and never called; the parameter
    stays so existing calls still compile

The third dead corner, the WOLFSSH_FWD_LOCAL_CLEANUP action the library
never emits, needs a setup/cleanup pairing record and a callback that
names the channel. That is larger than a cleanup and is not in this PR.

Copilot AI lite review requested due to automatic review settings August 27, 2026 23:12

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR cleans up the public forwarding API surface in wolfssh/ssh.h by removing two exported function declarations that have no implementation (and therefore can only produce link errors), and by clarifying that the WS_CallbackFwdIO callback parameter is currently stored but never invoked by the library.

Changes:

  • Removed the public declarations of wolfSSH_CTX_SetFwdEnable() and wolfSSH_SetFwdEnable() from wolfssh/ssh.h (both were declared but not defined anywhere).
  • Added a header comment documenting that WS_CallbackFwdIO is reserved: wolfSSH_CTX_SetFwdCb() stores it, but forwarding I/O flows through the channel API rather than this callback.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ejohnstown
ejohnstown requested review from wolfSSL-Fenrir-bot and removed request for wolfSSL-Fenrir-bot August 28, 2026 17:38
wolfSSH_CTX_SetFwdEnable() and wolfSSH_SetFwdEnable() are declared in
ssh.h and defined nowhere, so calling either is a link error rather than
a way to gate forwarding. Nothing can depend on them today.

- delete both declarations
- say in the header that the WS_CallbackFwdIO passed to
  wolfSSH_CTX_SetFwdCb() is stored and never called; the parameter stays
  so existing calls still compile

The third dead corner, the WOLFSSH_FWD_LOCAL_CLEANUP action the library
never emits, needs a setup/cleanup pairing record and a callback that
names the channel. That work is parked on ccb-phase2-local-cleanup.

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fenrir Automated Review — PR #1210

Scan targets checked: wolfssh-bugs, wolfssh-src

Fenrir result: Approved ✅

No new issues found in the changed files.

Advisory only — this automated result does not count as a GitHub approval.

@ejohnstown
ejohnstown requested a review from philljj August 28, 2026 22:31
@philljj philljj self-assigned this Aug 28, 2026
@philljj
philljj merged commit 6c77e49 into wolfSSL:master Aug 28, 2026
165 checks passed
@ejohnstown
ejohnstown deleted the ccb-phase1-6 branch August 28, 2026 23:20
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.

4 participants