chiark / gitweb /
sd-rtnl: handle empty multi-part message from the kernel
[elogind.git] / src / libsystemd / sd-rtnl / rtnl-message.c
index 5a719003ac354fc83cc968e0c5e0b0e4e65aa6b9..c938471fe30a957ec54427666a1aecf9b17c6872 100644 (file)
@@ -1554,7 +1554,9 @@ int socket_read_message(sd_rtnl *rtnl) {
                         /* finished reading multi-part message */
                         done = true;
 
-                        continue;
+                        /* if first is not defined, put NLMSG_DONE into the receive queue. */
+                        if (first)
+                                continue;
                 }
 
                 /* check that we support this message type */