16 lines
447 B
Diff
16 lines
447 B
Diff
|
diff --git a/ip/iplink.c b/ip/iplink.c
|
||
|
index dc98019..56768bd 100644
|
||
|
--- a/ip/iplink.c
|
||
|
+++ b/ip/iplink.c
|
||
|
@@ -176,8 +176,8 @@ static int iplink_have_newlink(void)
|
||
|
req.n.nlmsg_type = RTM_NEWLINK;
|
||
|
req.i.ifi_family = AF_UNSPEC;
|
||
|
|
||
|
- rtnl_send(&rth, &req.n, req.n.nlmsg_len);
|
||
|
- rtnl_listen(&rth, accept_msg, NULL);
|
||
|
+ if (rtnl_send(&rth, &req.n, req.n.nlmsg_len) == 0)
|
||
|
+ rtnl_listen(&rth, accept_msg, NULL);
|
||
|
}
|
||
|
return have_rtnl_newlink;
|
||
|
}
|