diff options
-rw-r--r-- | src/libsystemd/sd-rtnl/rtnl-message.c | 7 |
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; |