Re: [RFC PATCH net-next v2 0/5] netns: allow to identify peer netns

From
Nicolas Dichtel <hidden>
Date
2014-09-24 16:31:56
Also in
linux-api, lkml
Reply to
Cong Wang, 2014-09-24
Le 24/09/2014 18:15, Cong Wang a écrit :
On Wed, Sep 24, 2014 at 9:01 AM, Cong Wang [off-list ref] wrote:
quoted
And clearly you missed my question above: how do you get netns id
without sharing /var/run/netns/ ?
OK, I found it:
quoted
Ids are stored in the parent user namespace. These ids are valid only inside
this user namespace. The user can retrieve these ids via a new netlink messages,
but only if peer netns are in the same user namespace.
So your example is confusing, perhaps you need some other way to show the ID's
instead of binding to ip netns output which is basically ls
/var/run/netns/. We don't
want an inner netns know anything outside, IOW, we don't share /var/run/netns/.
Hmm, not sure to understand you. My usecase shares /var/run/netns, because
there is only one user ns and one mount ns.
I think in this case your ID's are still available, but aren't you
providing a new way
for the inner netns device to escape which we are trying to avoid?
It's why the ids depend on user ns. Only if user ns are the same we allow to
get an id for a peer netns.
_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/containers
Thread (25 messages) 25 messages, 4 authors, last reply 2014-09-26
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help