diff options
author | Tom Gundersen <teg@jklm.no> | 2015-02-06 14:43:17 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-02-08 16:34:27 +0100 |
commit | b8719ebb57961f93a9aeeb49f0b9ba1f2bab7068 (patch) | |
tree | 079575dbefb5c8a6eea8d99197c86258d07c8f2d /src/libsystemd | |
parent | b99802f769f9c0a5c2bc94e59ed43279492daa04 (diff) |
sd-rtnl: don't treat 0-length messages specially
Still parse the CMSG data, and most importantly make sure we drop the message when peeking.
Diffstat (limited to 'src/libsystemd')
-rw-r--r-- | src/libsystemd/sd-rtnl/rtnl-message.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/libsystemd/sd-rtnl/rtnl-message.c b/src/libsystemd/sd-rtnl/rtnl-message.c index f072899433..14a52dfae0 100644 --- a/src/libsystemd/sd-rtnl/rtnl-message.c +++ b/src/libsystemd/sd-rtnl/rtnl-message.c @@ -1350,10 +1350,6 @@ static int socket_recv_message(int fd, struct iovec *iov, uint32_t *_group, bool log_debug("rtnl: no data in socket"); return (errno == EAGAIN || errno == EINTR) ? 0 : -errno; - } else if (r == 0) { - /* connection was closed by the kernel? */ - log_warning("rtnl: ignoring empty message"); - return 0; } for (cmsg = CMSG_FIRSTHDR(&msg); cmsg; cmsg = CMSG_NXTHDR(&msg, cmsg)) { |