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] [day] [month] [year] [list]
Message-ID: <CAHA+R7OKEri7yaSbbObbqERsoW+yvP0Txerg6iM6bXDtnYXzUw@mail.gmail.com>
Date:	Wed, 21 May 2014 10:29:47 -0700
From:	Cong Wang <cwang@...pensource.com>
To:	Peter Fassberg <pf@...ssner.se>
Cc:	Rami Rosen <roszenrami@...il.com>,
	Nicolas Dichtel <nicolas.dichtel@...nd.com>,
	Netdev <netdev@...r.kernel.org>
Subject: Re: Default network namespace name

On Wed, May 21, 2014 at 10:21 AM, Peter Fassberg <pf@...ssner.se> wrote:
>
> How does "ip link set" distinguish between PID 1 and a namespace named "1"?

Looking at the code, it just checks if it's name "1" first, then
checks if it's a PID:

                        if ((netns = get_netns_fd(*argv)) >= 0)
                                addattr_l(&req->n, sizeof(*req),
IFLA_NET_NS_FD, &netns, 4);
                        else if (get_integer(&netns, *argv, 0) == 0)
                                addattr_l(&req->n, sizeof(*req),
IFLA_NET_NS_PID, &netns, 4);
                        else
                                invarg("Invalid \"netns\" value\n", *argv);
--
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