summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-rtnl/rtnl-message.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-08-28 15:59:13 +0200
committerTom Gundersen <teg@jklm.no>2014-08-28 21:19:16 +0200
commit5968b1c304188e466759b8ba419fc10f150e5541 (patch)
treed3407aeae9f5c70d3b8190b733a8bf130761bb53 /src/libsystemd/sd-rtnl/rtnl-message.c
parentac528e3e3b93981cc9692250556b113acce7eb17 (diff)
sd-rtnl: log if kernel buffer is overrun as we currently can't handle that case
Diffstat (limited to 'src/libsystemd/sd-rtnl/rtnl-message.c')
-rw-r--r--src/libsystemd/sd-rtnl/rtnl-message.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libsystemd/sd-rtnl/rtnl-message.c b/src/libsystemd/sd-rtnl/rtnl-message.c
index 1f596ca10c..906a9de1c0 100644
--- a/src/libsystemd/sd-rtnl/rtnl-message.c
+++ b/src/libsystemd/sd-rtnl/rtnl-message.c
@@ -1132,10 +1132,13 @@ static int socket_recv_message(int fd, struct iovec *iov, uint32_t *_group, bool
assert(iov);
r = recvmsg(fd, &msg, MSG_TRUNC | (peek ? MSG_PEEK : 0));
- if (r < 0)
+ if (r < 0) {
/* no data */
+ if (errno == ENOBUFS)
+ log_debug("rtnl: kernel receive buffer overrun");
+
return (errno == EAGAIN) ? 0 : -errno;
- else if (r == 0)
+ } else if (r == 0)
/* connection was closed by the kernel */
return -ECONNRESET;