Re: new link failing on duplicate names in different namespaces
From: Cong Wang <hidden>
Date: 2015-02-26 05:56:58
Attachments
- rtnetlink.patch [text/x-patch] 6028 bytes · preview
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.