mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
netns: Teach network device kobjects which namespace they are in.
The problem. Network devices show up in sysfs and with the network namespace active multiple devices with the same name can show up in the same directory, ouch! To avoid that problem and allow existing applications in network namespaces to see the same interface that is currently presented in sysfs, this patch enables the tagging directory support in sysfs. By using the network namespace pointers as tags to separate out the the sysfs directory entries we ensure that we don't have conflicts in the directories and applications only see a limited set of the network devices. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
07e98962fa
commit
608b4b9548
3 changed files with 56 additions and 0 deletions
|
@ -142,6 +142,7 @@ extern const struct sysfs_ops kobj_sysfs_ops;
|
|||
*/
|
||||
enum kobj_ns_type {
|
||||
KOBJ_NS_TYPE_NONE = 0,
|
||||
KOBJ_NS_TYPE_NET,
|
||||
KOBJ_NS_TYPES
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue