[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87a85si5f2.fsf@xmission.com>
Date: Thu, 01 Jun 2017 01:32:49 -0500
From: ebiederm@...ssion.com (Eric W. Biederman)
To: Cong Wang <xiyou.wangcong@...il.com>
Cc: Harald Welte <laforge@...monks.org>,
Linux Kernel Network Developers <netdev@...r.kernel.org>
Subject: Re: loosing netdevices with namespaces and unshare?
Cong Wang <xiyou.wangcong@...il.com> writes:
> Network namespace does not special-case the physical devices,
> it treats them all equally as abstract net devices.
Absolutely not true.
The relevant code is in net/core/dev.c:default_device_exit
If a network device does not implement rntl_link_ops it is returned to
the initial network namespace. Anything else will loose physical
devices.
Only for pure software based devices do we delete them. Perhaps your
sub interface implements rtnl_link_ops? Either that or something is
still holding a reference to your network namespace, which would prevent
the network device from being returned.
Eric
Powered by blists - more mailing lists