-
Notifications
You must be signed in to change notification settings - Fork 7.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mbedtls_net_set_nonblock / mbedtls_net_set_block doesn't work (IDFGH-2264) #4407
Comments
I've hacked around the C library problem, and it seems to work, but perhaps there are other issues with nonblocking sockets and that's why fcntl was disabled in the first place? |
This code doesn't work at all with the 2019r2 toolchain: It always fails with
If you need test cases, here they are (Espressif's own code): The problem also applies to esp-tls: esp-idf/components/esp-tls/esp_tls.c Line 191 in 93a8603
Basically anything that uses esp-tls in nonblocking mode is broken with the gcc 8.2 based toolchains. It just goes unnoticed because the call is not checked for errors. |
Any ACK on this? I think this problem needs to be fixed, as it affects multiple esp-idf components, but I can keep posting bug reports... ;-) One of the test cases for esp-idf should include nonblocking sockets. Apparently there's no such test. This only relates to the gcc 8 based toolchains (including 2019r2). |
Thanks for reporting this issue. Fix has been merged for this internally, once ESP-IDF codebase sync with github, this issue will be marked as closed. |
Latest master (93a8603) using 2019r2 toolchain.
mbedtls_net_set_nonblock / mbedtls_net_set_block doesn't work.
Steps to reproduce: try using mbedtls_net_set_nonblock / mbedtls_net_set_block
Apparently it's because HAVE_FCNTL was not defined when building the C library.
https://github.com/espressif/newlib-esp32/blob/esp_based_on_3_0_0/newlib/libc/syscalls/sysfcntl.c
The text was updated successfully, but these errors were encountered: