naccyde / rpms / iproute

Forked from rpms/iproute 9 months ago
Clone
Blob Blame History Raw
From 95a0e54cd3b045b9cd1128c0c8ad00e78f1d61c4 Mon Sep 17 00:00:00 2001
From: Jakub Sitnicki <jkbs@redhat.com>
Date: Wed, 27 Jul 2016 15:56:16 +0200
Subject: [PATCH] ip link: Remove unnecessary device checking

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1340914
Upstream Status: iproute2.git commit f1b66ff

commit f1b66ff83a0babbe99fef81b3a960d7a4ce8dbc6
Author: vadimk <vadim4j@gmail.com>
Date:   Sat Aug 30 15:06:00 2014 +0300

    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@gmail.com>
    Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
    Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 ip/iplink.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/ip/iplink.c b/ip/iplink.c
index 7ee015c..461dc95 100644
--- a/ip/iplink.c
+++ b/ip/iplink.c
@@ -631,8 +631,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++;
 	}
-- 
1.8.3.1