Skip to content

Commit 5968b1c

Browse files
committed
sd-rtnl: log if kernel buffer is overrun as we currently can't handle that case
1 parent ac528e3 commit 5968b1c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/libsystemd/sd-rtnl/rtnl-message.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,10 +1132,13 @@ static int socket_recv_message(int fd, struct iovec *iov, uint32_t *_group, bool
11321132
assert(iov);
11331133

11341134
r = recvmsg(fd, &msg, MSG_TRUNC | (peek ? MSG_PEEK : 0));
1135-
if (r < 0)
1135+
if (r < 0) {
11361136
/* no data */
1137+
if (errno == ENOBUFS)
1138+
log_debug("rtnl: kernel receive buffer overrun");
1139+
11371140
return (errno == EAGAIN) ? 0 : -errno;
1138-
else if (r == 0)
1141+
} else if (r == 0)
11391142
/* connection was closed by the kernel */
11401143
return -ECONNRESET;
11411144

0 commit comments

Comments
 (0)