/* if no data was passed, make sure we still initialize the padding
note that we can have data_length > 0 (used by some containers) */
padding = RTA_DATA(rta);
- data_length = 0;
}
/* make sure also the padding at the end of the message is initialized */
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;