[iproute/f14/master] Do not segfault when creating a peer veth link without a name

Petr Sabata psabata at fedoraproject.org
Tue Oct 12 15:43:59 UTC 2010


commit 4893285a50106bc6eb99712257b4166a73b2455f
Author: Petr Sabata <psabata at redhat.com>
Date:   Tue Oct 12 17:43:53 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 550c4c3..7c2608a 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: 4%{?dist}
-Group: Applications/System
+Summary:    Advanced IP routing and network device configuration tools
+Name:       iproute
+Version:    2.6.35
+Release:    5%{?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-4
 - 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