From f4984bb20b9fbda937ed079577020127b07855ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0abata?= Date: Thu, 29 Aug 2013 16:14:10 +0200 Subject: [PATCH] Fix an 'ip link' hang (#996537) --- iproute.spec | 7 ++++++- iproute2-3.10.0-rtnl_send.patch | 15 +++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 iproute2-3.10.0-rtnl_send.patch diff --git a/iproute.spec b/iproute.spec index a29f415..2ff89b6 100644 --- a/iproute.spec +++ b/iproute.spec @@ -2,7 +2,7 @@ Summary: Advanced IP routing and network device configuration tools Name: iproute Version: 3.10.0 -Release: 4%{?dist} +Release: 5%{?dist} Group: Applications/System URL: http://kernel.org/pub/linux/utils/net/%{name}2/ Source0: http://kernel.org/pub/linux/utils/net/%{name}2/%{name}2-%{version}.tar.gz @@ -19,6 +19,7 @@ Patch7: iproute2-2.6.39-lnstat-dump-to-stdout.patch Patch8: iproute2-3.8.0-unused-result.patch Patch9: iproute2-3.10.0-xfrm-state-overflow.patch Patch10: iproute2-3.10.0-lnstat-interval.patch +Patch11: iproute2-3.10.0-rtnl_send.patch License: GPLv2+ and Public Domain BuildRequires: bison BuildRequires: flex @@ -74,6 +75,7 @@ The libnetlink static library. %patch8 -p1 -b .unused-result %patch9 -p1 -b .xfrm-state %patch10 -p1 -b .lnstat-interval +%patch11 -p1 -b .rtnl_send sed -i 's/^LIBDIR=/LIBDIR?=/' Makefile %build @@ -173,6 +175,9 @@ done %{_includedir}/libnetlink.h %changelog +* Thu Aug 29 2013 Petr Šabata - 3.10.0-5 +- Fix an 'ip link' hang (#996537) + * Tue Aug 13 2013 Petr Šabata - 3.10.0-4 - lnstat -i: Run indefinitely if the --count isn't specified (#977845) - Switch to unversioned %%docdir diff --git a/iproute2-3.10.0-rtnl_send.patch b/iproute2-3.10.0-rtnl_send.patch new file mode 100644 index 0000000..65df1e5 --- /dev/null +++ b/iproute2-3.10.0-rtnl_send.patch @@ -0,0 +1,15 @@ +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; + }