mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-12 09:58:36 +00:00
Don't return -1 and abort if msg.msg_controllen is 0. For
some strange reason recvmsg() never sets errno to EAGAIN on a non-blocking socket and just returns 0. Reviewed by: jhb Approved by: re
This commit is contained in:
parent
07a38a786a
commit
65d06145a2
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=115394
@ -779,8 +779,7 @@ __msgread_withcred(sock, buf, cnt, cmp)
|
||||
bcopy(&cm.cmsg, &cmp->cmsg, sizeof(cmp->cmsg));
|
||||
bcopy(CMSG_DATA(&cm), &cmp->cmcred, sizeof(cmp->cmcred));
|
||||
|
||||
if (msg.msg_controllen == 0 ||
|
||||
(msg.msg_flags & MSG_CTRUNC) != 0)
|
||||
if ((msg.msg_flags & MSG_CTRUNC) != 0)
|
||||
return (-1);
|
||||
|
||||
return (ret);
|
||||
|
Loading…
Reference in New Issue
Block a user