summaryrefslogtreecommitdiff
path: root/src/libsystemd
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd')
-rw-r--r--src/libsystemd/sd-rtnl/rtnl-message.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/libsystemd/sd-rtnl/rtnl-message.c b/src/libsystemd/sd-rtnl/rtnl-message.c
index 47dcd4a782..ffc19f1bb6 100644
--- a/src/libsystemd/sd-rtnl/rtnl-message.c
+++ b/src/libsystemd/sd-rtnl/rtnl-message.c
@@ -1194,12 +1194,17 @@ int socket_read_message(sd_rtnl *rtnl) {
break;
}
- r = rtnl_rqueue_make_room(rtnl);
- if (r < 0)
- return r;
+ if (first) {
+ r = rtnl_rqueue_make_room(rtnl);
+ if (r < 0)
+ return r;
+
+ rtnl->rqueue[rtnl->rqueue_size ++] = first;
+ first = NULL;
+ }
- rtnl->rqueue[rtnl->rqueue_size ++] = first;
- first = NULL;
+ if (len)
+ log_debug("sd-rtnl: discarding %zu bytes of incoming message", len);
return ret;
}