chiark / gitweb /
sd-rtnl: add a bit more debugging in case a message is dropped
authorTom Gundersen <teg@jklm.no>
Mon, 1 Dec 2014 23:59:34 +0000 (00:59 +0100)
committerTom Gundersen <teg@jklm.no>
Mon, 1 Dec 2014 23:59:34 +0000 (00:59 +0100)
src/libsystemd/sd-rtnl/rtnl-message.c

index e7238d5..e5c72e7 100644 (file)
@@ -1306,8 +1306,10 @@ int socket_read_message(sd_rtnl *rtnl) {
                 }
 
                 /* check that the size matches the message type */
-                if (new_msg->nlmsg_len < NLMSG_LENGTH(nl_type->size))
+                if (new_msg->nlmsg_len < NLMSG_LENGTH(nl_type->size)) {
+                        log_debug("sd-rtnl: message larger than expected, dropping");
                         continue;
+                }
 
                 r = message_new_empty(rtnl, &m);
                 if (r < 0)