[iproute/f21] Backport fix for ip link add name regression that broke libvirt

Lubomir Rintel lkundrak at fedoraproject.org
Sat Oct 4 11:38:11 UTC 2014


commit 21bf8eeacdf228c0f2f4263d4aa2c823a2592d35
Author: Lubomir Rintel <lkundrak at v3.sk>
Date:   Sat Oct 4 13:07:33 2014 +0200

    Backport fix for ip link add name regression that broke libvirt
    
    Used to work in 3.14, broken in 3.16. Fix already upstream.
    Libvirt does this when adding a veth pair:
    
      # ip link add vnet18 type veth peer name vnet19
      Error: argument "vnet18" is wrong: Unknown device

 iproute.spec                           |    7 +++++-
 iproute2-3.16.0-ip-link-add-name.patch |   35 ++++++++++++++++++++++++++++++++
 2 files changed, 41 insertions(+), 1 deletions(-)
---
diff --git a/iproute.spec b/iproute.spec
index cbd90da..4bce247 100644
--- a/iproute.spec
+++ b/iproute.spec
@@ -2,7 +2,7 @@
 Summary:            Advanced IP routing and network device configuration tools
 Name:               iproute
 Version:            3.16.0
-Release:            2%{?dist}
+Release:            3%{?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 @@ Patch6:             iproute2-3.12.0-lnstat-dump-to-stdout.patch
 Patch7:             iproute2-3.11.0-tc-ok.patch
 Patch8:            iproute2-3.11.0-rtt.patch
 Patch9:            iproute2-3.12.0-lnstat-interval.patch
+Patch10:            iproute2-3.16.0-ip-link-add-name.patch
 License:            GPLv2+ and Public Domain
 BuildRequires:      bison
 BuildRequires:      flex
@@ -72,6 +73,7 @@ The libnetlink static library.
 %patch7 -p1 -b .tc_ok
 %patch8 -p1 -b .rtt
 %patch9 -p1 -b .lnstat-interval
+%patch10 -p1 -b .ip-link-add-name
 sed -i 's/^LIBDIR=/LIBDIR?=/' Makefile
 
 %build
@@ -174,6 +176,9 @@ done
 %{_includedir}/libnetlink.h
 
 %changelog
+* Sat Oct 04 2014 Lubomir Rintel <lkundrak at v3.sk> - 3.16.0-3
+- Backport fix for ip link add name regression that broke libvirt
+
 * Sat Aug 16 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.16.0-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
 
diff --git a/iproute2-3.16.0-ip-link-add-name.patch b/iproute2-3.16.0-ip-link-add-name.patch
new file mode 100644
index 0000000..8fcbc4d
--- /dev/null
+++ b/iproute2-3.16.0-ip-link-add-name.patch
@@ -0,0 +1,35 @@
+From f1b66ff83a0babbe99fef81b3a960d7a4ce8dbc6 Mon Sep 17 00:00:00 2001
+From: vadimk <vadim4j at gmail.com>
+Date: Sat, 30 Aug 2014 15:06:00 +0300
+Subject: [PATCH] ip link: Remove unnecessary device checking
+
+The real checking is performed later in iplink_modify(..) func which
+checks device existence if NLM_F_CREATE flag is set.
+
+Also it fixes the case when impossible to add veth link which was
+caused by 9a02651a87 (ip: check for missing dev arg when doing VF rate)
+because these devices are not exist yet.
+
+Signed-off-by: Vadim Kochan <vadim4j at gmail.com>
+Acked-by: Oliver Hartkopp <socketcan at hartkopp.net>
+Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
+---
+ ip/iplink.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/ip/iplink.c b/ip/iplink.c
+index 1a907d9..ea06871 100644
+--- a/ip/iplink.c
++++ b/ip/iplink.c
+@@ -593,8 +593,6 @@ int iplink_parse(int argc, char **argv, struct iplink_req *req,
+ 				duparg2("dev", *argv);
+ 			*dev = *argv;
+ 			dev_index = ll_name_to_index(*dev);
+-			if (dev_index == 0)
+-				invarg("Unknown device", *argv);
+ 		}
+ 		argc--; argv++;
+ 	}
+-- 
+2.1.0
+


More information about the scm-commits mailing list