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).

(cherry picked from commit 10b684b827)
This commit is contained in:
Thomas Haller 2015-12-10 15:50:00 +01:00
parent a89feb474b
commit df4e535752

View file

@ -4578,6 +4578,7 @@ event_handler_read_netlink_one (NMPlatform *platform)
NMLinuxPlatformPrivate *priv = NM_LINUX_PLATFORM_GET_PRIVATE (platform);
int nle;
errno = 0;
nle = nl_recvmsgs_default (priv->nlh_event);
/* Work around a libnl bug fixed in 3.2.22 (375a6294) */