Page MenuHomeFreeBSD

rpctls_impl.c: Fix handling of hung rpc tls daemon
Needs ReviewPublic

Authored by rmacklem on Sat, Jun 28, 8:38 PM.
Tags
None
Referenced Files
F122612427: D51083.id157726.diff
Sun, Jul 6, 5:53 PM
Unknown Object (File)
Sun, Jul 6, 1:51 AM
Unknown Object (File)
Sun, Jul 6, 1:40 AM
Unknown Object (File)
Sat, Jul 5, 7:05 PM
Unknown Object (File)
Sat, Jul 5, 1:05 PM
Unknown Object (File)
Fri, Jul 4, 7:20 PM
Unknown Object (File)
Fri, Jul 4, 7:13 PM
Unknown Object (File)
Fri, Jul 4, 8:19 AM
Subscribers

Details

Reviewers
glebius
Summary

Commit 26ee05939209 replaced soshutdown()
with soclose() for the case where the RPC TLS
daemon has not removed the socket from the RB
tree during an upcall.

It turns out that soshutdown() is needed for the
"else" case, which is the case that occurs when the
daemon is stuck in SSL_accept() or SSL_connect().

This patch adds a soshutdown() call to this else case,
which unsticks the daemon when the other end does
not do the actual TLS handshake. This can occur if
the daemon is not running at the other end.

Test Plan

Tested by doing NFS-over-TLS mount attempts with
no daemon running at the server end. It was also
tested by a trivial "fake" client that does the Null RPC
TLS probe, but then just sits there and doesn't do
a TLS handshake or close the TCP connection.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

sys/rpc/rpcsec_tls/rpctls_impl.c
247

I've already added "or SSL_connect()" to this line in the comment.