Branch: refs/heads/sctp-fixes
Home: https://github.com/kronosnet/kronosnet
Commit: 83865a0a9ebf3f5f0e100a2bfc8a935705e59b27
https://github.com/kronosnet/kronosnet/commit/83865a0a9ebf3f5f0e100a2bfc8a9…
Author: Christine Caulfield <ccaulfie(a)redhat.com>
Date: 2020-01-16 (Thu, 16 Jan 2020)
Changed paths:
M libknet/transport_common.c
M libknet/transport_sctp.c
Log Message:
-----------
[rx] Don't return 512 EOF messages from _recvmmsg
If recvmsg() returns 0 for EOF then it's going to do so
until the error is rectified or read with getsockopt(). But
the _recvmmsg() wrapper keeps reading until the vector is full
thus returning a block of 512 EOF messages all of which the caller
has to plough through.
This patch causes _recvmmsg() to return as soon as it has got
the first EOF so the the caller can deal with it in good time
and not spin looking at the same thing over and over again.
I've also fixed a couple of typos in related comments