diff options
author | Nicolas Dichtel <nicolas.dichtel@6wind.com> | 2015-01-15 15:11:17 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-01-19 14:32:03 -0500 |
commit | 1728d4fabd1bc9965728de25dda0b694b8da6450 (patch) | |
tree | ded88a9a2a0c6feb7374093f4ba85debcb0ee894 /drivers/net | |
parent | d37512a277dfb2cef8a578e25a3246f61399a55a (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/net')
-rw-r--r-- | drivers/net/vxlan.c | 8 |
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: return -EMSGSIZE; } +static struct net *vxlan_get_link_net(const struct net_device *dev) +{ + struct vxlan_dev *vxlan = netdev_priv(dev); + + return vxlan->net; +} + static struct rtnl_link_ops vxlan_link_ops __read_mostly = { .kind = "vxlan", .maxtype = IFLA_VXLAN_MAX, @@ -2934,6 +2941,7 @@ static struct rtnl_link_ops vxlan_link_ops __read_mostly = { .dellink = vxlan_dellink, .get_size = vxlan_get_size, .fill_info = vxlan_fill_info, + .get_link_net = vxlan_get_link_net, }; static void vxlan_handle_lowerdev_unregister(struct vxlan_net *vn, |