datapath: ip4_dst_hoplimit compat code is needed prior to v2.6.38
authorSimon Horman <simon.horman@netronome.com>
Fri, 18 Dec 2015 04:50:01 +0000 (20:50 -0800)
committerPravin B Shelar <pshelar@nicira.com>
Wed, 23 Dec 2015 22:12:14 +0000 (14:12 -0800)
ip4_dst_hoplimit was introduced in v2.6.38 rather than v2.6.39.

Fixes: e23775f20e1a ("datapath: Add support for lwtunnel")
Signed-off-by: Simon Horman <simon.horman@netronome.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
datapath/linux/compat/include/net/route.h

index bfabdc1..8f336b6 100644 (file)
@@ -100,7 +100,9 @@ static inline struct rtable *rpl_ip_route_output_key(struct net *net, struct flo
        return rt;
 }
 #define ip_route_output_key rpl_ip_route_output_key
+#endif
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38)
 static inline int ip4_dst_hoplimit(const struct dst_entry *dst)
 {
        return dst_metric(dst, RTAX_HOPLIMIT);