--- sys/rpc/svc.c.orig
+++ sys/rpc/svc.c
@@ -1000,6 +1000,7 @@
 		 * enable TLS offload first.
 		 */
 		if (xprt->xp_doneddp == 0 && r->rq_proc != NULLPROC &&
+		    xprt->xp_socket != NULL &&
 		    atomic_cmpset_int(&xprt->xp_doneddp, 0, 1)) {
 			if (xprt->xp_socket->so_proto->pr_protocol ==
 			    IPPROTO_TCP) {
