[ovs-dev] [PATCH 1/2] datapath: Backport ip4_dst_hoplimit() from 2.6.38.
Jesse Gross
jesse at nicira.com
Fri Mar 18 15:02:25 PDT 2011
Signed-off-by: Jesse Gross <jesse at nicira.com>
---
datapath/linux-2.6/compat-2.6/include/net/route.h | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
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 867f407..86e8e5b 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
--
1.7.1
More information about the dev
mailing list