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 867f407..86e8e5b 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