aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorNicolas Dichtel <nicolas.dichtel@6wind.com>2015-01-15 09:11:17 -0500
committerDavid S. Miller <davem@davemloft.net>2015-01-19 14:32:03 -0500
commit1728d4fabd1bc9965728de25dda0b694b8da6450 (patch)
treeded88a9a2a0c6feb7374093f4ba85debcb0ee894 /drivers
parentd37512a277dfb2cef8a578e25a3246f61399a55a (diff)
tunnels: advertise link netns via netlink
Implement 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 'drivers')
-rw-r--r--drivers/net/vxlan.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index c5f79e7513a6..0346eaa6d236 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -2923,6 +2923,13 @@ nla_put_failure:
2923 return -EMSGSIZE; 2923 return -EMSGSIZE;
2924} 2924}
2925 2925
2926static struct net *vxlan_get_link_net(const struct net_device *dev)
2927{
2928 struct vxlan_dev *vxlan = netdev_priv(dev);
2929
2930 return vxlan->net;
2931}
2932
2926static struct rtnl_link_ops vxlan_link_ops __read_mostly = { 2933static struct rtnl_link_ops vxlan_link_ops __read_mostly = {
2927 .kind = "vxlan", 2934 .kind = "vxlan",
2928 .maxtype = IFLA_VXLAN_MAX, 2935 .maxtype = IFLA_VXLAN_MAX,
@@ -2934,6 +2941,7 @@ static struct rtnl_link_ops vxlan_link_ops __read_mostly = {
2934 .dellink = vxlan_dellink, 2941 .dellink = vxlan_dellink,
2935 .get_size = vxlan_get_size, 2942 .get_size = vxlan_get_size,
2936 .fill_info = vxlan_fill_info, 2943 .fill_info = vxlan_fill_info,
2944 .get_link_net = vxlan_get_link_net,
2937}; 2945};
2938 2946
2939static void vxlan_handle_lowerdev_unregister(struct vxlan_net *vn, 2947static void vxlan_handle_lowerdev_unregister(struct vxlan_net *vn,