summaryrefslogtreecommitdiff
path: root/net/bridge/br_private.h
diff options
context:
space:
mode:
authorTyler Hicks <tyhicks@canonical.com>2018-07-21 00:56:54 +0300
committerDavid S. Miller <davem@davemloft.net>2018-07-21 09:44:36 +0300
commit705e0dea4d52ef420a7d37fd9cc6725092e5e1ff (patch)
treeecb58544a2cc3dec04f902788b427ee63fef2bd1 /net/bridge/br_private.h
parentfbdeaed408cf2728c62640c10848ddb1b67e63d3 (diff)
downloadlinux-705e0dea4d52ef420a7d37fd9cc6725092e5e1ff.tar.xz
bridge: make sure objects belong to container's owner
When creating various bridge objects in /sys/class/net/... make sure that they belong to the container's owner instead of global root (if they belong to a container/namespace). Signed-off-by: Tyler Hicks <tyhicks@canonical.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge/br_private.h')
-rw-r--r--net/bridge/br_private.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
index 5216a524b537..cf0005d2a4d0 100644
--- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h
@@ -283,6 +283,8 @@ struct net_bridge_port {
u16 group_fwd_mask;
};
+#define kobj_to_brport(obj) container_of(obj, struct net_bridge_port, kobj)
+
#define br_auto_port(p) ((p)->flags & BR_AUTO_MASK)
#define br_promisc_port(p) ((p)->flags & BR_PROMISC)