[ovs-dev] [PATCH 2/5] datapath: ip4_dst_hoplimit compat code is needed prior to v2.6.38

Simon Horman simon.horman at netronome.com
Fri Dec 18 04:50:01 UTC 2015


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 at netronome.com>
---
 datapath/linux/compat/include/net/route.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/datapath/linux/compat/include/net/route.h b/datapath/linux/compat/include/net/route.h
index bfabdc1a8669..8f336b6955c5 100644
--- a/datapath/linux/compat/include/net/route.h
+++ b/datapath/linux/compat/include/net/route.h
@@ -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);
-- 
2.1.4




More information about the dev mailing list