From 8ab968d4efd041f36face42ff3d725b6bdf1435b Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 25 Jan 2016 14:38:35 +0100 Subject: [PATCH] platform: fix draining netlink socket on cache resync Fixes: 809c547b6c8522570add25581b41b3514a5c5dfb --- src/platform/nm-linux-platform.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index 153ac68642..626cc7f44d 100644 --- a/src/platform/nm-linux-platform.c +++ b/src/platform/nm-linux-platform.c @@ -5659,6 +5659,12 @@ continue_reading: goto continue_reading; } stop: + if (!handle_events) { + /* when we don't handle events, we want to drain all messages from the socket + * without handling the messages (but still check for sequence numbers). + * Repeat reading. */ + goto continue_reading; + } err = 0; out: nlmsg_free (msg);