1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00

Fixes the MSG_PEEK for sctp_generic_recvmsg() the msg_flags

were not being copied in properly so PEEK and any other
msg_flags input operation were not being performed right.
Approved by:	gnn
This commit is contained in:
Randall Stewart 2007-01-24 12:59:56 +00:00
parent c4758f8e7f
commit 6dbde03086
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=166207

View File

@ -2648,7 +2648,7 @@ sctp_generic_recvmsg(td, uap)
struct file *fp;
struct sockaddr *fromsa;
int fromlen;
int len, i, msg_flags = 0;
int len, i, msg_flags;
int error = 0;
#ifdef KTRACE
struct uio *ktruio = NULL;
@ -2682,7 +2682,14 @@ sctp_generic_recvmsg(td, uap)
} else {
fromlen = 0;
}
if(uap->msg_flags) {
error = copyin(uap->msg_flags, &msg_flags, sizeof (int));
if (error) {
goto out;
}
} else {
msg_flags = 0;
}
auio.uio_iov = iov;
auio.uio_iovcnt = uap->iovlen;
auio.uio_segflg = UIO_USERSPACE;
@ -2699,6 +2706,7 @@ sctp_generic_recvmsg(td, uap)
}
len = auio.uio_resid;
fromsa = (struct sockaddr *)sockbufstore;
#ifdef KTRACE
if (KTRPOINT(td, KTR_GENIO))
ktruio = cloneuio(&auio);