Date: Fri, 10 Sep 2021 21:51:38 +0300 From: Andriy Gapon <avg@FreeBSD.org> To: "net@FreeBSD.org" <net@FreeBSD.org>, hackers@FreeBSD.org Subject: recvmsg() "short receive" after FIONREAD Message-ID: <500a2272-c1b3-3f97-0096-9fe8117c4b95@FreeBSD.org>
next in thread | raw e-mail | index | archive | help
I observe a problem with the code that can be seen here: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/blob/master/src/modules/rtp/sap.c#L142 The code uses ioctl(FIONREAD) to check the size of available data in a socket. Does / should this work? Then the code calls recvmsg() on the socket with single vector with iov_len equal to the size obtained earlier. But the return value from recvmsg() is smaller than the iov_len value. In my test I see 215 vs expected 263 (so, the difference is 48). Does this ring a bell to anyone? I see this on a month old 14.0-CURRENT arm64. -- Andriy Gapon
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?500a2272-c1b3-3f97-0096-9fe8117c4b95>