File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -661,15 +661,15 @@ entirely.
661661
662662** Fix (already applied):** ` ssh_server.c ` detects ` wolfIP_sock_accept() ` returning
663663` -1 ` and automatically calls ` ssh_reinit_listen() ` to close and recreate the
664- listen socket on port 22 . In addition, ` wolfSSH_shutdown() ` is now skipped for
664+ listen socket on the configured SSH port . In addition, ` wolfSSH_shutdown() ` is now skipped for
665665connections that never reached the authenticated (` CONNECTED ` ) state, which
666666reduces the CLOSING-state latency and narrows the timing window.
667667
668668** If the issue re-occurs** (e.g. after a very rapid series of failed attempts),
669669UART will now show:
670670
671671```
672- SSH: Listen socket error, reinitializing
672+ SSH: Reinitializing listen socket
673673SSH: Listen socket recovered
674674```
675675
Original file line number Diff line number Diff line change @@ -371,7 +371,10 @@ int ssh_server_poll(void)
371371 * client ACK arrived before wolfIP_sock_accept() was called,
372372 * or destroyed after TCP_CTRL_RTO_MAXRTX retries).
373373 * Reinitialize to recover. */
374- ssh_reinit_listen ();
374+ if (ssh_reinit_listen () < 0 ) {
375+ debug_print ("SSH: Listen reinit failed\n" );
376+ return -1 ;
377+ }
375378 }
376379 break ;
377380
You can’t perform that action at this time.
0 commit comments