netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Activate netns
@ 2014-03-27 14:51 Peter Fassberg
  2014-03-27 16:02 ` Nicolas Dichtel
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Peter Fassberg @ 2014-03-27 14:51 UTC (permalink / raw)
  To: netdev


Hi!

I have trouble to activate netns on OpenWrt with kernel 3.8.13.

I get this:

root@ROOter:~# ip netns show
root@ROOter:~# ip netns add blue
Failed to create a new network namespace "blue": Invalid argument
root@ROOter:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
rootfs                   48377     10493     37884  22% /
/dev/root                48377     10493     37884  22% /
tmpfs                   257036      2264    254772   1% /tmp
tmpfs                      512         0       512   0% /dev
/dev/sda2                 4088      2266      1618  58% /mnt
/dev/sda1                 4088      2266      1618  58% /mnt
tmpfs                   257036      2264    254772   1% /tmp/run/netns
root@ROOter:~# uname -a
Linux ROOter 3.8.13 #2 Wed Mar 26 21:39:04 CET 2014 i686 GNU/Linux
root@ROOter:~#


Any hints on what I'm missing?



Regards,

// Peter

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

* Re: Activate netns
  2014-03-27 14:51 Activate netns Peter Fassberg
@ 2014-03-27 16:02 ` Nicolas Dichtel
  2014-03-28  0:22   ` Peter Fassberg
  2014-03-27 16:06 ` Eric Dumazet
  2014-03-27 16:34 ` Cong Wang
  2 siblings, 1 reply; 5+ messages in thread
From: Nicolas Dichtel @ 2014-03-27 16:02 UTC (permalink / raw)
  To: Peter Fassberg, netdev

Le 27/03/2014 15:51, Peter Fassberg a écrit :
>
> Hi!
>
> I have trouble to activate netns on OpenWrt with kernel 3.8.13.
>
> I get this:
>
> root@ROOter:~# ip netns show
> root@ROOter:~# ip netns add blue
> Failed to create a new network namespace "blue": Invalid argument
> root@ROOter:~# df
> Filesystem           1K-blocks      Used Available Use% Mounted on
> rootfs                   48377     10493     37884  22% /
> /dev/root                48377     10493     37884  22% /
> tmpfs                   257036      2264    254772   1% /tmp
> tmpfs                      512         0       512   0% /dev
> /dev/sda2                 4088      2266      1618  58% /mnt
> /dev/sda1                 4088      2266      1618  58% /mnt
> tmpfs                   257036      2264    254772   1% /tmp/run/netns
> root@ROOter:~# uname -a
> Linux ROOter 3.8.13 #2 Wed Mar 26 21:39:04 CET 2014 i686 GNU/Linux
> root@ROOter:~#
>
>
> Any hints on what I'm missing?
Trivial question: are you sure that CONFIG_NET_NS is set?


Regards,
Nicolas

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

* Re: Activate netns
  2014-03-27 14:51 Activate netns Peter Fassberg
  2014-03-27 16:02 ` Nicolas Dichtel
@ 2014-03-27 16:06 ` Eric Dumazet
  2014-03-27 16:34 ` Cong Wang
  2 siblings, 0 replies; 5+ messages in thread
From: Eric Dumazet @ 2014-03-27 16:06 UTC (permalink / raw)
  To: Peter Fassberg; +Cc: netdev

On Thu, 2014-03-27 at 15:51 +0100, Peter Fassberg wrote:
> Hi!
> 
> I have trouble to activate netns on OpenWrt with kernel 3.8.13.
> 
> I get this:
> 
> root@ROOter:~# ip netns show
> root@ROOter:~# ip netns add blue
> Failed to create a new network namespace "blue": Invalid argument
> root@ROOter:~# df
> Filesystem           1K-blocks      Used Available Use% Mounted on
> rootfs                   48377     10493     37884  22% /
> /dev/root                48377     10493     37884  22% /
> tmpfs                   257036      2264    254772   1% /tmp
> tmpfs                      512         0       512   0% /dev
> /dev/sda2                 4088      2266      1618  58% /mnt
> /dev/sda1                 4088      2266      1618  58% /mnt
> tmpfs                   257036      2264    254772   1% /tmp/run/netns
> root@ROOter:~# uname -a
> Linux ROOter 3.8.13 #2 Wed Mar 26 21:39:04 CET 2014 i686 GNU/Linux
> root@ROOter:~#
> 
> 
> Any hints on what I'm missing?
> 

Are you sure kernel was compiled with netns support ?

CONFIG_NET_NS=y

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

* Re: Activate netns
  2014-03-27 14:51 Activate netns Peter Fassberg
  2014-03-27 16:02 ` Nicolas Dichtel
  2014-03-27 16:06 ` Eric Dumazet
@ 2014-03-27 16:34 ` Cong Wang
  2 siblings, 0 replies; 5+ messages in thread
From: Cong Wang @ 2014-03-27 16:34 UTC (permalink / raw)
  To: Peter Fassberg; +Cc: netdev

On Thu, Mar 27, 2014 at 7:51 AM, Peter Fassberg <pf@leissner.se> wrote:
>
> Hi!
>
> I have trouble to activate netns on OpenWrt with kernel 3.8.13.
>
> I get this:
>
> root@ROOter:~# ip netns show
> root@ROOter:~# ip netns add blue
> Failed to create a new network namespace "blue": Invalid argument

Basically, `ip netns add blue` creates a file named "blue" in /var/run/netns/
and then binds mount it with /proc/self/ns/net so that this netns could
be held outside.

Try to strace ip netns add to see if setns() fails, which is likely caused
by the lack of netns support of your kernel.

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

* Re: Activate netns
  2014-03-27 16:02 ` Nicolas Dichtel
@ 2014-03-28  0:22   ` Peter Fassberg
  0 siblings, 0 replies; 5+ messages in thread
From: Peter Fassberg @ 2014-03-28  0:22 UTC (permalink / raw)
  To: Nicolas Dichtel, Eric Dumazet, Cong Wang; +Cc: netdev

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1454 bytes --]


On Thu, 27 Mar 2014, Nicolas Dichtel wrote:

> Le 27/03/2014 15:51, Peter Fassberg a écrit :
>> 
>> Hi!
>> 
>> I have trouble to activate netns on OpenWrt with kernel 3.8.13.
>> 
>> I get this:
>> 
>> root@ROOter:~# ip netns show
>> root@ROOter:~# ip netns add blue
>> Failed to create a new network namespace "blue": Invalid argument
>> root@ROOter:~# df
>> Filesystem           1K-blocks      Used Available Use% Mounted on
>> rootfs                   48377     10493     37884  22% /
>> /dev/root                48377     10493     37884  22% /
>> tmpfs                   257036      2264    254772   1% /tmp
>> tmpfs                      512         0       512   0% /dev
>> /dev/sda2                 4088      2266      1618  58% /mnt
>> /dev/sda1                 4088      2266      1618  58% /mnt
>> tmpfs                   257036      2264    254772   1% /tmp/run/netns
>> root@ROOter:~# uname -a
>> Linux ROOter 3.8.13 #2 Wed Mar 26 21:39:04 CET 2014 i686 GNU/Linux
>> root@ROOter:~#
>> 
>> 
>> Any hints on what I'm missing?
> Trivial question: are you sure that CONFIG_NET_NS is set?

That was my first question, and I double-checked the menuconfig *GUI*, and it was all fine, "<*>".

But now I have also checked the .config file, and there was no trace of CONFIG_KERNEL_NET_NS.

I made a clean checkout and did a new try - and it all worked!!

The config must have been messed up at some point.

Thank you for your time!

Sorry.



// Peter

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

end of thread, other threads:[~2014-03-28  0:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-27 14:51 Activate netns Peter Fassberg
2014-03-27 16:02 ` Nicolas Dichtel
2014-03-28  0:22   ` Peter Fassberg
2014-03-27 16:06 ` Eric Dumazet
2014-03-27 16:34 ` Cong Wang

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