platform: fix event_handler_read_netlink_one() wrongly returning with nothing to read
When the errno was accidentally set to EAGAIN or EWOULDBLOCK, we would only read one single message and return that there is nothing to read. This means, if there were more then one messages ready to read, we would only read the first one and return to the main-loop (which then again calls back to platform as more data is ready to be read).
This commit is contained in:
@@ -5449,6 +5449,7 @@ event_handler_read_netlink_one (NMPlatform *platform)
|
|||||||
NMLinuxPlatformPrivate *priv = NM_LINUX_PLATFORM_GET_PRIVATE (platform);
|
NMLinuxPlatformPrivate *priv = NM_LINUX_PLATFORM_GET_PRIVATE (platform);
|
||||||
int nle;
|
int nle;
|
||||||
|
|
||||||
|
errno = 0;
|
||||||
nle = nl_recvmsgs_default (priv->nlh_event);
|
nle = nl_recvmsgs_default (priv->nlh_event);
|
||||||
|
|
||||||
/* Work around a libnl bug fixed in 3.2.22 (375a6294) */
|
/* Work around a libnl bug fixed in 3.2.22 (375a6294) */
|
||||||
|
Reference in New Issue
Block a user