aboutsummaryrefslogtreecommitdiffstats
path: root/net/8021q
diff options
context:
space:
mode:
authorNicolas Dichtel <nicolas.dichtel@6wind.com>2015-01-20 09:15:44 -0500
committerDavid S. Miller <davem@davemloft.net>2015-01-23 20:51:15 -0500
commit1f17257b1f4a000d65c44da1a95b10ee83382896 (patch)
tree1285418bfd6b8a7096356de9d0d43279c802e7fa /net/8021q
parent3390e397611ca9da6bbd6ba5e8bc81a0a91da572 (diff)
vlan: advertise link netns via netlink
Assign rtnl_link_ops->get_link_net() callback so that IFLA_LINK_NETNSID is added to rtnetlink messages. Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/8021q')
-rw-r--r--net/8021q/vlan_netlink.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/8021q/vlan_netlink.c b/net/8021q/vlan_netlink.c
index 8ac8a5cc2143..c92b52f37d38 100644
--- a/net/8021q/vlan_netlink.c
+++ b/net/8021q/vlan_netlink.c
@@ -238,6 +238,13 @@ nla_put_failure:
238 return -EMSGSIZE; 238 return -EMSGSIZE;
239} 239}
240 240
241static struct net *vlan_get_link_net(const struct net_device *dev)
242{
243 struct net_device *real_dev = vlan_dev_priv(dev)->real_dev;
244
245 return dev_net(real_dev);
246}
247
241struct rtnl_link_ops vlan_link_ops __read_mostly = { 248struct rtnl_link_ops vlan_link_ops __read_mostly = {
242 .kind = "vlan", 249 .kind = "vlan",
243 .maxtype = IFLA_VLAN_MAX, 250 .maxtype = IFLA_VLAN_MAX,
@@ -250,6 +257,7 @@ struct rtnl_link_ops vlan_link_ops __read_mostly = {
250 .dellink = unregister_vlan_dev, 257 .dellink = unregister_vlan_dev,
251 .get_size = vlan_get_size, 258 .get_size = vlan_get_size,
252 .fill_info = vlan_fill_info, 259 .fill_info = vlan_fill_info,
260 .get_link_net = vlan_get_link_net,
253}; 261};
254 262
255int __init vlan_netlink_init(void) 263int __init vlan_netlink_init(void)