cloudabi_sock_recv() and linux_recvmsg_common() use kern_recvit(), which may return control messages in addition to data. Suppose one uses sendmsg() to transmit multiple SCM_RIGHTS messages in a single call. When these messages are externalized, the unix socket code will place them in separate mbufs which get returned as a chain from kern_recvit(). From code inspection, some consumers only handle the first mbuf in the chain, so control messages will be dropped in some cases.
Hi, Is there somewhere an example of what needs to be done for a person without much knowledge about the network code, but interest to get one or both of the emulation areas fixed? Bye, Alexander.
(In reply to Alexander Leidinger from comment #1) You might compare handling of the "controlp == NULL" case in kern_recvit() with the handling of the "control != NULL" case in linux_recvmsg_common(). The former iterates over all mbufs in the chain, the latter does not.