netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ip link: Remove unnecessary device checking
@ 2014-08-30 12:06 Vadim Kochan
  2014-08-30 17:01 ` Oliver Hartkopp
  0 siblings, 1 reply; 2+ messages in thread
From: Vadim Kochan @ 2014-08-30 12:06 UTC (permalink / raw)
  To: netdev; +Cc: Vadim Kochan

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>
---
 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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ip link: Remove unnecessary device checking
  2014-08-30 12:06 [PATCH] ip link: Remove unnecessary device checking Vadim Kochan
@ 2014-08-30 17:01 ` Oliver Hartkopp
  0 siblings, 0 replies; 2+ messages in thread
From: Oliver Hartkopp @ 2014-08-30 17:01 UTC (permalink / raw)
  To: Vadim Kochan, netdev; +Cc: Mehdi Abaakouk

On 30.08.2014 14:06, Vadim Kochan wrote:
> 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>

This also fixes this issue from Mehdi Abaakouk here:
http://marc.info/?l=linux-netdev&m=140912053421637

And the stuff I needed to change here:
https://gitorious.org/linux-can/can-tests/commit/578d07b0a13e0c171801cde8c048ac657373491e

Thanks for figuring out the detailed problem Vadim!

Regards,
Oliver

> ---
>  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++;
>  	}
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-30 17:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-30 12:06 [PATCH] ip link: Remove unnecessary device checking Vadim Kochan
2014-08-30 17:01 ` Oliver Hartkopp

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).