datapath: Backport ip4_dst_hoplimit() from 2.6.38.
authorJesse Gross <jesse@nicira.com>
Fri, 18 Mar 2011 21:43:51 +0000 (14:43 -0700)
committerJesse Gross <jesse@nicira.com>
Fri, 18 Mar 2011 22:10:04 +0000 (15:10 -0700)
Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
datapath/linux-2.6/compat-2.6/include/net/route.h

index 867f4077e33493a1d0e7eee93049e662ec9ebf59..86e8e5babb1a1ef7ce4307384af03a2e44a88727 100644 (file)
 
 #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