From 46d69d187e2eac37523efd535085cb8a29633615 Mon Sep 17 00:00:00 2001 From: Flavio Leitner Date: Fri, 28 Aug 2015 10:37:09 -0300 Subject: [PATCH] datapath: check for backported proto_ports_offset Red Hat Enterprise Linux 6 has backported it from upstream, so check for proto_ports_offset instead of kernel version. Signed-off-by: Flavio Leitner Signed-off-by: Jesse Gross --- acinclude.m4 | 1 + datapath/linux/compat/include/linux/in.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/acinclude.m4 b/acinclude.m4 index db0de0ddb..5e34d92de 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -324,6 +324,7 @@ AC_DEFUN([OVS_CHECK_LINUX_COMPAT], [ OVS_GREP_IFELSE([$KSRC/include/linux/if_vlan.h], [vlan_set_encap_proto]) OVS_GREP_IFELSE([$KSRC/include/linux/in.h], [ipv4_is_multicast]) + OVS_GREP_IFELSE([$KSRC/include/linux/in.h], [proto_ports_offset]) OVS_GREP_IFELSE([$KSRC/include/net/ip.h], [__ip_select_ident.*dst_entry], [OVS_DEFINE([HAVE_IP_SELECT_IDENT_USING_DST_ENTRY])]) OVS_GREP_IFELSE([$KSRC/include/net/ip.h], [inet_get_local_port_range.*net], diff --git a/datapath/linux/compat/include/linux/in.h b/datapath/linux/compat/include/linux/in.h index fa2e02641..78f8d7731 100644 --- a/datapath/linux/compat/include/linux/in.h +++ b/datapath/linux/compat/include/linux/in.h @@ -4,7 +4,7 @@ #include_next #include -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37) +#ifndef HAVE_PROTO_PORTS_OFFSET static inline int proto_ports_offset(int proto) { switch (proto) { -- 2.20.1