Thread (20 messages) 20 messages, 5 authors, 2015-02-28

Re: What are the intended semantics of IFLA_LINK_NETNSID?

From: Nicolas Dichtel <hidden>
Date: 2015-02-26 14:52:43

Le 26/02/2015 14:48, Eric W. Biederman a écrit :
Nicolas Dichtel [off-list ref] writes:
[snip]
quoted
The interface is first created in link_net and moved at the end in dest_net.

IP tunnels interfaces (ipip, sit, ip6_tunnels, gre[v6]) does not use src_net,
I am pretty certain that is simply something that was overlooked when
cross network namespace support was added to those network device types.
Right now I would be surprised if anything in userspace cares, so we can
probably just change those device types to look at src_net from newlink.
At least, depending of the interface type, the behavior is not the same. Thus,
making all interfaces consistent seems good.
Certainly for our sanity in maintaining rtnl_newlink finding a way to
make that change would be preferable.  Even if we ultimately have to add
a flag that says only make src_net different from dev->net when
IFLA_LINK_NETNSID is passed.
A flag is probably not needed, it's just a matter of passing src_net through
the functions that create the tunnel device.
As making that change allows much more consistency in the code and
allows us to get rid of an unnecessary dev_change_net_namespace.
Yes, I add this dev_change_net_namespace() to be independant of the interface
implementation (and thus beeing consistent whatever the interface type is used).


Nicolas
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help