]> git.baikalelectronics.ru Git - kernel.git/commit
netns: Teach network device kobjects which namespace they are in.
authorEric W. Biederman <ebiederm@xmission.com>
Wed, 5 May 2010 00:36:45 +0000 (17:36 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 21 May 2010 16:37:32 +0000 (09:37 -0700)
commit1c0cebd0b8830dc5ec95ac3fd9aadb7f1d438fc2
tree6855a119e99a4e0142c17b8cc4aa08968f3f6ab6
parent6f3282768ec47ace24ac19fc4bd1c9a29d3ab33e
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>
include/linux/kobject.h
net/Kconfig
net/core/net-sysfs.c