Skip to content

Commit

Permalink
datapath: check for backported proto_ports_offset
Browse files Browse the repository at this point in the history
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 <fbl@redhat.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
  • Loading branch information
fleitner authored and jessegross committed Aug 28, 2015
1 parent 75e9328 commit 46d69d1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions acinclude.m4
Expand Up @@ -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],
Expand Down
2 changes: 1 addition & 1 deletion datapath/linux/compat/include/linux/in.h
Expand Up @@ -4,7 +4,7 @@
#include_next <linux/in.h>

#include <linux/module.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)
#ifndef HAVE_PROTO_PORTS_OFFSET
static inline int proto_ports_offset(int proto)
{
switch (proto) {
Expand Down

0 comments on commit 46d69d1

Please sign in to comment.