Conversation
Do you mean that mbedtls is directly calling in to the C-level lwip API, and not going through I'd be reluctant to patch lwip like done in this PR. Would much prefer to fix the errnos in |
No. mbedtls calls the stream read/write. As you know, these don't raise errors, they return MP_STREAM_ERROR and set the errno. The current modsocket just does
Hmm, I actually thought that patching LwIP like this is far more elegant than to let it produce some wrong error codes and then try to correct them. Thoughts:
You tell me which you want... |
|
What about updating to IDF v4.1 so this is not needed? See #6413; I'm happy to do the work to update that. |
|
That works for me. |
|
fixed by #6613 |
This commit addresses #5752 and fixes the issue cleanly in expectation of #5825 where it otherwise shows up through the mbedssl stack. I couldn't remember a case I could test at this stage, I'm not sure there is any because the errno's are currently fixed-up explicitly in
modsocket.c. It's only with the fixes to mbedtls for non-blocking sockets that the errors are checked before that fix-up and then the mess surfaces.(I've made the changes in this PR a while ago on my fork but had them as part of #5819 and pulled them out today to keep the individual PRs/commits cleanly focused.)