datapath: Backport ip4_dst_hoplimit() from 2.6.38.
[openvswitch] / 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