diff --git a/include/vr_compat.h b/include/vr_compat.h index 43b7a80e0..cd480fedb 100644 --- a/include/vr_compat.h +++ b/include/vr_compat.h @@ -24,8 +24,9 @@ typedef u64 netdev_features_t; * * #define skb_get_rxhash skb_get_hash */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,11)) && \ - !(defined(skb_get_rxhash)) +#if (((LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,11)) && \ + !(defined(skb_get_rxhash))) || \ + (defined(RHEL_MAJOR) && (RHEL_MAJOR >= 7))) static inline __u32 skb_get_rxhash(struct sk_buff *skb) { diff --git a/linux/vr_genetlink.c b/linux/vr_genetlink.c index 06714645f..1e8b87cda 100644 --- a/linux/vr_genetlink.c +++ b/linux/vr_genetlink.c @@ -169,7 +169,8 @@ vr_genetlink_init(void) if (ret) return ret; -#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,13,0)) +#if ((LINUX_VERSION_CODE < KERNEL_VERSION(3,13,0)) && \ + (!(defined(RHEL_MAJOR) && (RHEL_MAJOR >= 7)))) return genl_register_family_with_ops(&vrouter_genl_family, vrouter_genl_ops, ARRAY_SIZE(vrouter_genl_ops)); #else