From 034694196899580af53ac622fd7c074730a9a5c7 Mon Sep 17 00:00:00 2001 From: Pravin B Shelar Date: Thu, 10 Dec 2015 20:03:00 -0800 Subject: datapath: define compat ip_tunnel_get_link_net() Same as ip_tunnel_get_iflink(), function ip_tunnel_get_link_net() also depends on ip_tunnel structure. So this patch defines compat implementation for same. Signed-off-by: Pravin B Shelar Acked-by: Jesse Gross --- datapath/linux/compat/include/net/ip_tunnels.h | 3 +++ datapath/linux/compat/ip_tunnel.c | 7 +++++++ 2 files changed, 10 insertions(+) (limited to 'datapath') diff --git a/datapath/linux/compat/include/net/ip_tunnels.h b/datapath/linux/compat/include/net/ip_tunnels.h index 185d7e985..7083372b3 100644 --- a/datapath/linux/compat/include/net/ip_tunnels.h +++ b/datapath/linux/compat/include/net/ip_tunnels.h @@ -304,5 +304,8 @@ void rpl_ip_tunnel_setup(struct net_device *dev, int net_id); #define ip_tunnel_get_iflink rpl_ip_tunnel_get_iflink int rpl_ip_tunnel_get_iflink(const struct net_device *dev); + +#define ip_tunnel_get_link_net rpl_ip_tunnel_get_link_net +struct net *rpl_ip_tunnel_get_link_net(const struct net_device *dev); #endif /* HAVE_METADATA_DST */ #endif /* __NET_IP_TUNNELS_H */ diff --git a/datapath/linux/compat/ip_tunnel.c b/datapath/linux/compat/ip_tunnel.c index db0cb8ef0..2d4070ecc 100644 --- a/datapath/linux/compat/ip_tunnel.c +++ b/datapath/linux/compat/ip_tunnel.c @@ -290,4 +290,11 @@ int rpl_ip_tunnel_get_iflink(const struct net_device *dev) return tunnel->parms.link; } +struct net *rpl_ip_tunnel_get_link_net(const struct net_device *dev) +{ + struct ip_tunnel *tunnel = netdev_priv(dev); + + return tunnel->net; +} + #endif -- cgit v1.2.1