chiark / gitweb /
sd-rtnl: log if kernel buffer is overrun as we currently can't handle that case
authorTom Gundersen <teg@jklm.no>
Thu, 28 Aug 2014 13:59:13 +0000 (15:59 +0200)
committerTom Gundersen <teg@jklm.no>
Thu, 28 Aug 2014 19:19:16 +0000 (21:19 +0200)
src/libsystemd/sd-rtnl/rtnl-message.c

index 1f596ca..906a9de 100644 (file)
@@ -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;