Fix sosend() for the case where mbufs are passed in while doing ktls.
For kernel tls, sosend() needs to call ktls_frame() on the mbuf list to be sent. Without this patch, this was only done when sosend()'s arguments used a uio_iov and not when an mbuf list is passed in. At this time, sosend() is never called with an mbuf list argument when kernel tls is in use, but will be once nfs-over-tls has been incorporated into head. Reviewed by: gallatin, glebius Differential Revision: https://reviews.freebsd.org/D24674
This commit is contained in:
parent
9f716a645d
commit
469f2e9e9a
@ -1678,6 +1678,13 @@ sosend_generic(struct socket *so, struct sockaddr *addr, struct uio *uio,
|
||||
resid = 0;
|
||||
if (flags & MSG_EOR)
|
||||
top->m_flags |= M_EOR;
|
||||
#ifdef KERN_TLS
|
||||
if (tls != NULL) {
|
||||
ktls_frame(top, tls, &tls_enq_cnt,
|
||||
tls_rtype);
|
||||
tls_rtype = TLS_RLTYPE_APP;
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
/*
|
||||
* Copy the data from userland into a mbuf
|
||||
|
Loading…
Reference in New Issue
Block a user