mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-29 05:40:11 +01:00
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:
parent
a89feb474b
commit
df4e535752
1 changed files with 1 additions and 0 deletions
|
|
@ -4578,6 +4578,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) */
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue