HomeFreeBSD

clnt_rc.c: Fix the case where a TLS handshake fails

Description

clnt_rc.c: Fix the case where a TLS handshake fails

When a TLS handshake fails during a NFS-over-TLS
mount attempt, the socket was left around because
it needed to be dereferenced. The dereference was
not happening in clnt_vc_destroy() because ct_closeit
was not set to TRUE.

This patch moves the code that sets ct_closeit to TRUE
up to before the rpctls_connect() call, so that ct_closeit
is set to TRUE if it fails and clnt_vc_destroy() will then
dereference the socket.

Reviewed by: glebius
Differential Revision: https://reviews.freebsd.org/D51084

Details

Provenance
rmacklemAuthored on Jul 19 2025, 12:39 AM
Reviewer
glebius
Differential Revision
D51084: clnt_rc.c: Fix the case where a TLS handshake fails
Parents
rG0bf113e9041f: tzcode: Add an explicit "the timezone file has changed" case
Branches
Unknown
Tags
Unknown