From: Jesse Gross Date: Fri, 18 Mar 2011 21:43:51 +0000 (-0700) Subject: datapath: Backport ip4_dst_hoplimit() from 2.6.38. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48cad9dc53a7c63eadf1b480a5a9412d76666c21;p=openvswitch datapath: Backport ip4_dst_hoplimit() from 2.6.38. Signed-off-by: Jesse Gross Acked-by: Ben Pfaff --- 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