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 20:32:03 +0100 |
commit | 1728d4fabd1bc9965728de25dda0b694b8da6450 (patch) | |
tree | ded88a9a2a0c6feb7374093f4ba85debcb0ee894 /net/ipv4/ip_tunnel.c | |
parent | rtnl: add link netns id to interface messages (diff) | |
download | linux-1728d4fabd1bc9965728de25dda0b694b8da6450.tar.xz linux-1728d4fabd1bc9965728de25dda0b694b8da6450.zip |
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 'net/ipv4/ip_tunnel.c')
-rw-r--r-- | net/ipv4/ip_tunnel.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/ipv4/ip_tunnel.c b/net/ipv4/ip_tunnel.c index d3e447936720..2cd08280c77b 100644 --- a/net/ipv4/ip_tunnel.c +++ b/net/ipv4/ip_tunnel.c @@ -972,6 +972,14 @@ void ip_tunnel_dellink(struct net_device *dev, struct list_head *head) } EXPORT_SYMBOL_GPL(ip_tunnel_dellink); +struct net *ip_tunnel_get_link_net(const struct net_device *dev) +{ + struct ip_tunnel *tunnel = netdev_priv(dev); + + return tunnel->net; +} +EXPORT_SYMBOL(ip_tunnel_get_link_net); + int ip_tunnel_init_net(struct net *net, int ip_tnl_net_id, struct rtnl_link_ops *ops, char *devname) { |