From 48cad9dc53a7c63eadf1b480a5a9412d76666c21 Mon Sep 17 00:00:00 2001 From: Jesse Gross Date: Fri, 18 Mar 2011 14:43:51 -0700 Subject: [PATCH] datapath: Backport ip4_dst_hoplimit() from 2.6.38. Signed-off-by: Jesse Gross Acked-by: Ben Pfaff --- datapath/linux-2.6/compat-2.6/include/net/route.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/datapath/linux-2.6/compat-2.6/include/net/route.h b/datapath/linux-2.6/compat-2.6/include/net/route.h index 867f4077..86e8e5ba 100644 --- a/datapath/linux-2.6/compat-2.6/include/net/route.h +++ b/datapath/linux-2.6/compat-2.6/include/net/route.h @@ -11,4 +11,11 @@ #endif /* linux kernel < 2.6.25 */ +#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); +} +#endif + #endif -- 2.30.2