Commit 7325678
echoserver: keep the EOF reply owed across a rekey
wolfSSH_ChannelIdRead() has no rekey guard, so a drained channel still
reports zero mid-rekey and the drain loop calls the reply in. That send
returns WS_REKEYING before it prepares a packet, so nothing is queued.
- take the send's status instead of discarding it
- latch eofAnswered and ChildRunning on every status but WS_REKEYING, so
the reply is retried on a later pass; the KEX traffic wakes it
- a short send is left latching: it bundled the EOF and set eofTxd, so a
retry queues nothing and the loop would stall in an untimed select
waiting on a peer that has already half-closed
- same change in the Espressif copy1 parent 7b17f65 commit 7325678
2 files changed
Lines changed: 20 additions & 6 deletions
File tree
- examples/echoserver
- ide/Espressif/ESP-IDF/examples/wolfssh_echoserver/main
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1067 | 1067 | | |
1068 | 1068 | | |
1069 | 1069 | | |
1070 | | - | |
1071 | | - | |
1072 | | - | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
1073 | 1080 | | |
1074 | 1081 | | |
1075 | 1082 | | |
| |||
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1051 | 1051 | | |
1052 | 1052 | | |
1053 | 1053 | | |
1054 | | - | |
1055 | | - | |
1056 | | - | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
1057 | 1064 | | |
1058 | 1065 | | |
1059 | 1066 | | |
| |||
0 commit comments