Mathieu Peresse <mathieu.peresse@xxxxxxxxx> writes: > Hi, > > [this is related to the use of Eric Biederman's new set of patches for named > netns / netns switching] > > ok so I successfully modified /sbin/ip. I can now: > - add/del a new netns by name: "ip netns {addns,delns} ns_name" > -> The namespace files are mounted on /var/run/netns/ns_name (so you have to > mkdir /var/run/netns/ for this to work). > - list netns: "ip netns show" > - use /sbin/ip in any named netns: "ip -netns ns_name link show" > > (rough patch against current git tree attached) > > I want now to move devices across namespaces using their filesystem names > (instead of using PIDs...). I'm not sure I can do it in userspace with the > current code yet, can I ? > I saw there was a rtnetlink attribute to set the netns of a device but it > uses the PID of a namespace owner to do so... within 'ip' i can refer to > only one namespace (i.e. the one that 'ip' task_struct->ns_proxy currently > points to), so I won't be able to move an interface from outside my > namespace to my namespace... > I hope my explanation is clear and that this will get some interest... :) In my nsfd tree if you look there is a new IFLA_NET_NS_FD attribute so should be able to update the existing code in ip that takes a netns by pid, and do a name based search first, and if you don't find the name and the value is numeric do a search by ip. > BTW is this the right ML to post this on ? For hashing out the idea this is fine. Ultimately this conversation needs to hit netdev, before we merge all of this. That rough patch looks particularly promising. Eric _______________________________________________ Containers mailing list Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/containers