File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -8496,16 +8496,24 @@ static int DoGlobalRequestFwd(WOLFSSH* ssh,
84968496 isCancel ? " cancel" : "", bindAddr, bindPort);
84978497 }
84988498
8499- if (ret == WS_SUCCESS && wantReply) {
8500- ret = SendGlobalRequestFwdSuccess(ssh, 1, bindPort);
8501- }
8502-
85038499 if (ret == WS_SUCCESS) {
85048500 if (ssh->ctx->fwdCb) {
85058501 ret = ssh->ctx->fwdCb(isCancel ? WOLFSSH_FWD_REMOTE_CLEANUP :
85068502 WOLFSSH_FWD_REMOTE_SETUP,
85078503 ssh->fwdCbCtx, bindAddr, bindPort);
85088504 }
8505+ else {
8506+ WLOG(WS_LOG_WARN, "No forwarding callback set, rejecting request. "
8507+ "Set one with wolfSSH_CTX_SetFwdCb().");
8508+ ret = WS_UNIMPLEMENTED_E;
8509+ }
8510+ }
8511+
8512+ if (ret == WS_SUCCESS && wantReply) {
8513+ ret = SendGlobalRequestFwdSuccess(ssh, 1, bindPort);
8514+ }
8515+ else if (ret == WS_UNIMPLEMENTED_E && wantReply) {
8516+ SendGlobalRequestFwdSuccess(ssh, 0, 0);
85098517 }
85108518
85118519 if (bindAddr != NULL)
You can’t perform that action at this time.
0 commit comments