projects
/
project
/
odhcp6c.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4a9de78
)
Fix compilation on 32-bit platforms
author
Steven Barth
<steven@midlink.org>
Wed, 30 Oct 2013 12:43:15 +0000
(13:43 +0100)
committer
Steven Barth
<steven@midlink.org>
Wed, 30 Oct 2013 12:43:15 +0000
(13:43 +0100)
src/ra.c
patch
|
blob
|
history
diff --git
a/src/ra.c
b/src/ra.c
index aa03ff4d3ab8f6235b38aa8f069c785d3486a10e..971a1723e84a4a05b9c966d1e406df1cae12492e 100644
(file)
--- 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;