From df4e5357521d00f4d9bc746cb2f530d5617d3e2c Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 10 Dec 2015 15:50:00 +0100 Subject: [PATCH] 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 10b684b82704274b86f729203df0f760589d762d) --- src/platform/nm-linux-platform.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index e385257174..3680f84cfd 100644 --- a/src/platform/nm-linux-platform.c +++ b/src/platform/nm-linux-platform.c @@ -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) */