summaryrefslogtreecommitdiff
path: root/src/ra.c
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2013-10-30 13:43:15 +0100
committerSteven Barth <steven@midlink.org>2013-10-30 13:43:15 +0100
commit39e84aa6f7c4b6b70149abfa7e786dc0c893caf5 (patch)
tree630895cd4e3c66a5ed94a64e73d7891cbf150769 /src/ra.c
parent4a9de784477a0f0dbc04ff890e35adae02ee6e8b (diff)
downloadodhcp6c-39e84aa6f7c4b6b70149abfa7e786dc0c893caf5.tar.gz
Fix compilation on 32-bit platforms
Diffstat (limited to 'src/ra.c')
-rw-r--r--src/ra.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ra.c b/src/ra.c
index aa03ff4..971a172 100644
--- a/src/ra.c
+++ b/src/ra.c
@@ -161,7 +161,8 @@ bool ra_link_up(void)
do {
read = recv(rtnl, &resp, sizeof(resp), MSG_DONTWAIT);
- if (!NLMSG_OK(&resp.hdr, read) || resp.hdr.nlmsg_type != RTM_NEWLINK ||
+ if (read < 0 || !NLMSG_OK(&resp.hdr, (size_t)read) ||
+ resp.hdr.nlmsg_type != RTM_NEWLINK ||
resp.msg.ifi_index != if_index)
continue;