iproute/iproute2-3.10.0-rtnl_send.patch

16 lines
447 B
Diff
Raw Normal View History

2013-08-29 14:14:10 +00:00
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;
}