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  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]
Date:	Wed, 21 May 2014 11:44:13 +0200
From:	Nicolas Dichtel <nicolas.dichtel@...nd.com>
To:	Peter Fassberg <pf@...ssner.se>, netdev@...r.kernel.org
Subject: Re: Default network namespace name

Le 21/05/2014 08:36, Peter Fassberg a écrit :
>
> Hi!
>
> Is there a name of the default network namespace?
No.

>
> I would like to execute a command in the default network namespace while running
> a shell in a non-default namespace.
>
> Like this: ip netns exec "" ip link
> Or this:   ip netns exec . ip link
>
> That command end up with a mis-spelled error message: :)
> seting the network namespace "" failed: Invalid argument

You can try something like this (I suppose that init runs in your
"default network namespace") :

ip netns add foo (just to create /var/run/netns which is a tmpfs)
ip netns del foo
touch /var/run/netns/default
mount --bind /proc/1/ns/net /var/run/netns/default
ip netns exec default ip link

Regards,
Nicolas
--
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