Thread (6 messages) 6 messages, 3 authors, 2016-09-16

Re: [PATCH v2] iproute2: build nsid-name cache only for commands that need it

flat view

From: Nicolas Dichtel <hidden>
Date: 2016-09-16 15:43:09

Le 16/09/2016 à 15:18, Anton Aksola a écrit :
[snip]
Nicolas,
This seems to be caused by netns_add calling unshare(CLONE_NEWNET).
If we initialize the socket for nsid after that it doesn't seem to work.

Unfortunately I'm not an expert in these details. Should we separate the
socket and cache initialization to different functions and call the
socket init in the beginning of do_netns() as before? What do you think?
Seems good.
I made a quick patch and it seems to work in batch mode now.
What is the result of that sequence?

$ ip netns add bar
$ ip netns set bar 5678
$ ip -b test.batch
nsid 1234 (iproute2 netns name: foo)
nsid 5678 (iproute2 netns name: bar)
$
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help