lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141211170928.62c8e637@griffin>
Date:	Thu, 11 Dec 2014 17:09:28 +0100
From:	Jiri Benc <jbenc@...hat.com>
To:	Vadim Kochan <vadim4j@...il.com>
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH iproute2] ip: Simplify executing ip cmd within namespace

On Thu, 11 Dec 2014 00:56:35 +0200, Vadim Kochan wrote:
> From: Vadim Kochan <vadim4j@...il.com>
> 
> Added new '-ns' option to simplify executing following cmd:
> 
>     ip netns exec NETNS ip OPTIONS COMMAND OBJECT
> 
>     to
> 
>     ip -ns NETNS OPTIONS COMMAND OBJECT
> 
> e.g.:
> 
>     ip -ns vnet0 link add br0 type bridge

This is great! It's a thing that has been bothering me for long time
but never got high enough on my todo list. Thanks for working on this.

However,

> --- a/ip/ip.c
> +++ b/ip/ip.c
> @@ -262,6 +262,12 @@ int main(int argc, char **argv)
>  			rcvbuf = size;
>  		} else if (matches(opt, "-help") == 0) {
>  			usage();
> +		} else if (matches(opt, "-ns") == 0) {
> +			argc--;
> +			argv++;
> +			argv[0] = argv[1];
> +			argv[1] = basename;
> +			return netns_exec(argc, argv);

I very much dislike this. There's no reason to exec another ip binary.
The main reason I wanted the -n (or whatever) option was to speed up
execution of test scripts in environments with hundreds of interfaces
in different net namespaces.

Please just change to the specified netns and continue with interpreting
of the rest of the command line, there's absolutely no reason for doing
the exec.

Thanks,

 Jiri

-- 
Jiri Benc
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ