naccyde / rpms / iproute

Forked from rpms/iproute 5 months ago
Clone

Blame SOURCES/0221-ip-link-Remove-unnecessary-device-checking.patch

049c96
From 95a0e54cd3b045b9cd1128c0c8ad00e78f1d61c4 Mon Sep 17 00:00:00 2001
049c96
From: Jakub Sitnicki <jkbs@redhat.com>
049c96
Date: Wed, 27 Jul 2016 15:56:16 +0200
049c96
Subject: [PATCH] ip link: Remove unnecessary device checking
049c96
049c96
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1340914
049c96
Upstream Status: iproute2.git commit f1b66ff
049c96
049c96
commit f1b66ff83a0babbe99fef81b3a960d7a4ce8dbc6
049c96
Author: vadimk <vadim4j@gmail.com>
049c96
Date:   Sat Aug 30 15:06:00 2014 +0300
049c96
049c96
    ip link: Remove unnecessary device checking
049c96
049c96
    The real checking is performed later in iplink_modify(..) func which
049c96
    checks device existence if NLM_F_CREATE flag is set.
049c96
049c96
    Also it fixes the case when impossible to add veth link which was
049c96
    caused by 9a02651a87 (ip: check for missing dev arg when doing VF rate)
049c96
    because these devices are not exist yet.
049c96
049c96
    Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
049c96
    Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
049c96
    Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
049c96
---
049c96
 ip/iplink.c | 2 --
049c96
 1 file changed, 2 deletions(-)
049c96
049c96
diff --git a/ip/iplink.c b/ip/iplink.c
049c96
index 7ee015c..461dc95 100644
049c96
--- a/ip/iplink.c
049c96
+++ b/ip/iplink.c
049c96
@@ -631,8 +631,6 @@ int iplink_parse(int argc, char **argv, struct iplink_req *req,
049c96
 				duparg2("dev", *argv);
049c96
 			*dev = *argv;
049c96
 			dev_index = ll_name_to_index(*dev);
049c96
-			if (dev_index == 0)
049c96
-				invarg("Unknown device", *argv);
049c96
 		}
049c96
 		argc--; argv++;
049c96
 	}
049c96
-- 
049c96
1.8.3.1
049c96