mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-08-01 10:06:53 +03:00
Simplify net_accept() with UDP sockets
This is made possible by the new API where net_accept() gets a pointer to bind_ctx, so it can update it.
This commit is contained in:
@ -273,13 +273,6 @@ reset:
|
||||
goto exit;
|
||||
}
|
||||
|
||||
/* With UDP, bind_fd is hijacked by client_fd, so bind a new one */
|
||||
if( ( ret = mbedtls_net_bind( &listen_fd, NULL, "4433", MBEDTLS_NET_PROTO_UDP ) ) != 0 )
|
||||
{
|
||||
printf( " failed\n ! mbedtls_net_bind returned -0x%x\n\n", -ret );
|
||||
goto exit;
|
||||
}
|
||||
|
||||
/* For HelloVerifyRequest cookies */
|
||||
if( ( ret = mbedtls_ssl_set_client_transport_id( &ssl,
|
||||
client_ip, cliip_len ) ) != 0 )
|
||||
|
Reference in New Issue
Block a user