[iproute] Do not segfault when creating a peer veth link without a name
Petr Sabata
psabata at fedoraproject.org
Tue Oct 12 15:54:30 UTC 2010
commit a3822ddc4b0b534c998df8f87a0359ea7950a660
Author: Petr Sabata <psabata at redhat.com>
Date: Tue Oct 12 17:54:23 2010 +0200
Do not segfault when creating a peer veth link without a name
iproute.spec | 45 +++++++++++---------
...e2-2.6.33-create-peer-veth-without-a-name.patch | 11 +++++
2 files changed, 36 insertions(+), 20 deletions(-)
---
diff --git a/iproute.spec b/iproute.spec
index 4f35239..3522079 100644
--- a/iproute.spec
+++ b/iproute.spec
@@ -1,27 +1,28 @@
#%define date_version 20091106
%define cbq_version v0.7.3
-Summary: Advanced IP routing and network device configuration tools
-Name: iproute
-Version: 2.6.35
-Release: 6%{?dist}
-Group: Applications/System
+Summary: Advanced IP routing and network device configuration tools
+Name: iproute
+Version: 2.6.35
+Release: 7%{?dist}
+Group: Applications/System
##Source: iproute2-%{date_version}.tar.bz2
-Source: http://developer.osdl.org/dev/iproute2/download/iproute2-%{version}.tar.bz2
-URL: http://linux-net.osdl.org/index.php/Iproute2
-Patch0: man-pages.patch
-Patch1: iproute2-2.6.29-kernel.patch
-Patch2: iproute2-ss050901-opt_flags.patch
-Patch3: iproute2-2.6.25-segfault.patch
-Patch4: iproute2-sharepath.patch
-Patch5: iproute2-2.6.31-tc_modules.patch
-Patch6: iproute2-2.6.29-IPPROTO_IP_for_SA.patch
-Patch7: iproute2-example-cbq-service.patch
-Patch8: iproute2-2.6.35-print-route.patch
-Patch9: iproute2-print-route-u32.patch
-
-License: GPLv2+ and Public Domain
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Source: http://developer.osdl.org/dev/iproute2/download/iproute2-%{version}.tar.bz2
+URL: http://linux-net.osdl.org/index.php/Iproute2
+Patch0: man-pages.patch
+Patch1: iproute2-2.6.29-kernel.patch
+Patch2: iproute2-ss050901-opt_flags.patch
+Patch3: iproute2-2.6.25-segfault.patch
+Patch4: iproute2-sharepath.patch
+Patch5: iproute2-2.6.31-tc_modules.patch
+Patch6: iproute2-2.6.29-IPPROTO_IP_for_SA.patch
+Patch7: iproute2-example-cbq-service.patch
+Patch8: iproute2-2.6.35-print-route.patch
+Patch9: iproute2-print-route-u32.patch
+Patch10: iproute2-2.6.33-create-peer-veth-without-a-name.patch
+
+License: GPLv2+ and Public Domain
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: tex(latex) tex(dvips) linuxdoc-tools
BuildRequires: flex linux-atm-libs-devel psutils db4-devel bison
# introduction new iptables (xtables) which broke ipt
@@ -53,6 +54,7 @@ The iproute documentation contains howtos and examples of settings.
%patch7 -p1 -b .fix_cbq
%patch8 -p1 -b .print-route
%patch9 -p1 -b .print-route-u32
+%patch10 -p1 -b .peer-veth-without-name
%build
export LIBDIR=/%{_libdir}
@@ -134,6 +136,9 @@ EOF
%doc RELNOTES
%changelog
+* Tue Oct 12 2010 Petr Sabata <psabata at redhat.com> - 2.6.33-7
+- Do not segfault if peer name is omitted when creating a peer veth link, rhbz#642322
+
* Mon Oct 11 2010 Petr Sabata <psabata at redhat.com> - 2.6.35-6
- Man-pages update, rhbz#641599
diff --git a/iproute2-2.6.33-create-peer-veth-without-a-name.patch b/iproute2-2.6.33-create-peer-veth-without-a-name.patch
new file mode 100644
index 0000000..1b64b30
--- /dev/null
+++ b/iproute2-2.6.33-create-peer-veth-without-a-name.patch
@@ -0,0 +1,11 @@
+--- iproute2-2.6.33/ip/link_veth.c 2010-02-25 04:56:50.000000000 +0100
++++ iproute2-2.6.33/ip/link_veth.c.new 2010-10-12 17:25:01.159138225 +0200
+@@ -27,7 +27,7 @@
+ static int veth_parse_opt(struct link_util *lu, int argc, char **argv,
+ struct nlmsghdr *hdr)
+ {
+- char *name, *type, *link, *dev;
++ char *name = NULL, *type = NULL, *link = NULL, *dev = NULL;
+ int err, len;
+ struct rtattr * data;
+
More information about the scm-commits
mailing list