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

Re: new link failing on duplicate names in different namespaces

From: Cong Wang <hidden>
Date: 2015-02-26 05:56:58

On Wed, Feb 25, 2015 at 9:29 PM, Cong Wang [off-list ref] wrote:
On Wed, Feb 25, 2015 at 9:44 AM, Eric W. Biederman
[off-list ref] wrote:
quoted
The code that creates a network devices fundamentally needs to know
about both namespaces network devices like the macvlan driver need
to find their lower devices in the original network namespace.

I think we could possibly remove the restriction for the names of newly
created network devices being unique in both network namespaces but I
don't think the code changes will be trivial.
We should add a flag to network devices, so that some devices which
don't have an underlying device, like veth, are allowed to be create right
in the given netns. Or, of course, just modify rtnl_newlink() if we have
some other clue (tb[IFLA_LINK] == NULL?).
Never mind, seems we only need to move the dest_net and link_net
up before checking duplicated.

Please give the attached patch a try.

Attachments

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