summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-12-02 00:59:34 +0100
committerTom Gundersen <teg@jklm.no>2014-12-02 00:59:34 +0100
commit64918838d566058b7cec72d13f4524de0a64a8e3 (patch)
treed834fc5402e3934a41f7e7762635038788652490
parent73ae2b7dade339c8a258dcf4fa2b302e238117e1 (diff)
sd-rtnl: add a bit more debugging in case a message is dropped
-rw-r--r--src/libsystemd/sd-rtnl/rtnl-message.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libsystemd/sd-rtnl/rtnl-message.c b/src/libsystemd/sd-rtnl/rtnl-message.c
index e7238d530b..e5c72e7653 100644
--- a/src/libsystemd/sd-rtnl/rtnl-message.c
+++ b/src/libsystemd/sd-rtnl/rtnl-message.c
@@ -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)