CHERIoT-Platform / network-stack

5 stars 1 forks source link

Better handle TCP/IP stack crashes in the TLS compartment. #23

Closed hlef closed 4 months ago

hlef commented 4 months ago

When the TCP/IP stack crashes, API calls to the compartment return -ECOMPARTMENTFAIL. These should be treated similarly to -ENOTCONN.

Currently -ECOMPARTMENTFAIL failures are not considered by the TLS compartment and are handled in various (incorrect) ways across the code-base. Address this.

While we are at it, avoid the call to network_socket_close if the socket is a nullptr.

hlef commented 4 months ago

@davidchisnall Updated to address the comments.