Fill msg_len for the initial element of msgvec.

Submitted by:	Daniel Salzman <daniel.salzman@nic.cz>
MFC after:	3 days
This commit is contained in:
Konstantin Belousov 2016-10-11 11:45:12 +00:00
parent 4afe249835
commit c3b83049d6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=307036

View File

@ -69,6 +69,8 @@ recvmmsg(int s, struct mmsghdr *__restrict msgvec, size_t vlen, int flags,
if (ret == -1)
return (ret);
msgvec[0].msg_len = ret;
/*
* Do non-blocking receive for second and later messages if
* WAITFORONE is set.