mbedtls: mbedlts_net_bind should bind on all interfaces with bind_ip == NULL
As per mbedtls documentation. This is different to lwip_getaddrinfo() which uses loopback for a NULL address. Fixes bug mentioned here https://groups.google.com/forum/#!topic/esp-open-rtos/3KH5TZSTMUw
This commit is contained in:
parent
e2759f9e7d
commit
3dfa2272cc
2 changed files with 34 additions and 10 deletions
|
@ -158,7 +158,7 @@ void tls_server_task(void *pvParameters)
|
|||
/*
|
||||
* 1. Start the connection
|
||||
*/
|
||||
ret = mbedtls_net_bind(&server_ctx, "0.0.0.0", PORT, MBEDTLS_NET_PROTO_TCP);
|
||||
ret = mbedtls_net_bind(&server_ctx, NULL, PORT, MBEDTLS_NET_PROTO_TCP);
|
||||
if(ret != 0)
|
||||
{
|
||||
printf(" failed\n ! mbedtls_net_bind returned %d\n\n", ret);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue