WireGuard Archive on lore.kernel.org
 help / color / Atom feed
* RHEL8 compatibility
@ 2019-09-10 20:42 Robert-André Mauchin
  2019-09-10 21:18 ` Robert-André Mauchin
  0 siblings, 1 reply; 3+ messages in thread
From: Robert-André Mauchin @ 2019-09-10 20:42 UTC (permalink / raw)
  To: WireGuard mailing list

Hello,

The RHEL8 kernel (4.18) contains backported changes that make it act more like
a > 4.7 kernel. As such src/compat/compat.h need to be patched to handle
RHEL8 special case.

We are currently using this patch in RPMFusion EPEL8 branch:

--- a/WireGuard-0.0.20190702/src/compat/compat.h
+++ b/WireGuard-0.0.20190702/src/compat/compat.h
@@ -79,18 +79,6 @@
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0) && !defined(ISRHEL7)
 #define ipv6_dst_lookup(a, b, c, d) ipv6_dst_lookup(b, c, d)
-#endif
-
-#if (LINUX_VERSION_CODE == KERNEL_VERSION(4, 4, 0) || \
-    (LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 5) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 2, 0)) || \
-    (LINUX_VERSION_CODE < KERNEL_VERSION(4, 1, 17) && LINUX_VERSION_CODE > KERNEL_VERSION(3, 19, 0)) || \
-    (LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 27) && LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)) || \
-    (LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 8) && LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)) || \
-    (LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 40) && LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0)) || \
-    (LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 54))) && !defined(ISUBUNTU1404)
-#include <linux/if.h>
-#include <net/ip_tunnels.h>
-#define IP6_ECN_set_ce(a, b) IP6_ECN_set_ce(b)
 #endif
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0) && IS_ENABLED(CONFIG_IPV6) && !defined(ISRHEL7)


Could you please define a ISRHEL8 to handle this?


_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: RHEL8 compatibility
  2019-09-10 20:42 RHEL8 compatibility Robert-André Mauchin
@ 2019-09-10 21:18 ` Robert-André Mauchin
  2019-09-11 16:49   ` Jason A. Donenfeld
  0 siblings, 1 reply; 3+ messages in thread
From: Robert-André Mauchin @ 2019-09-10 21:18 UTC (permalink / raw)
  To: WireGuard mailing list

On Tuesday, 10 September 2019 22:42:40 CEST you wrote:
> Hello,
> 
> The RHEL8 kernel (4.18) contains backported changes that make it act more
> like a > 4.7 kernel. As such src/compat/compat.h need to be patched to
> handle RHEL8 special case.
> 
> We are currently using this patch in RPMFusion EPEL8 branch:
> 
> --- a/WireGuard-0.0.20190702/src/compat/compat.h
> +++ b/WireGuard-0.0.20190702/src/compat/compat.h
> @@ -79,18 +79,6 @@
> 
>  #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 0) && !defined(ISRHEL7)
>  #define ipv6_dst_lookup(a, b, c, d) ipv6_dst_lookup(b, c, d)
> -#endif
> -
> -#if (LINUX_VERSION_CODE == KERNEL_VERSION(4, 4, 0) || \
> -    (LINUX_VERSION_CODE < KERNEL_VERSION(4, 3, 5) && LINUX_VERSION_CODE >=
> KERNEL_VERSION(4, 2, 0)) || \ -    (LINUX_VERSION_CODE < KERNEL_VERSION(4,
> 1, 17) && LINUX_VERSION_CODE > KERNEL_VERSION(3, 19, 0)) || \ -   
> (LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 27) && LINUX_VERSION_CODE >=
> KERNEL_VERSION(3, 17, 0)) || \ -    (LINUX_VERSION_CODE < KERNEL_VERSION(3,
> 16, 8) && LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)) || \ -   
> (LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 40) && LINUX_VERSION_CODE >=
> KERNEL_VERSION(3, 13, 0)) || \ -    (LINUX_VERSION_CODE < KERNEL_VERSION(3,
> 12, 54))) && !defined(ISUBUNTU1404) -#include <linux/if.h>
> -#include <net/ip_tunnels.h>
> -#define IP6_ECN_set_ce(a, b) IP6_ECN_set_ce(b)
>  #endif
> 
>  #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0) &&
> IS_ENABLED(CONFIG_IPV6) && !defined(ISRHEL7)
> 
> 
> Could you please define a ISRHEL8 to handle this?

Sorry this apply to RHEL 7 not 8.


_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: RHEL8 compatibility
  2019-09-10 21:18 ` Robert-André Mauchin
@ 2019-09-11 16:49   ` Jason A. Donenfeld
  0 siblings, 0 replies; 3+ messages in thread
From: Jason A. Donenfeld @ 2019-09-11 16:49 UTC (permalink / raw)
  To: Robert-André Mauchin; +Cc: WireGuard mailing list

Does something like this work?

diff --git a/src/compat/compat.h b/src/compat/compat.h
index 54907e9a..888974a3 100644
--- a/src/compat/compat.h
+++ b/src/compat/compat.h
@@ -90,7 +90,7 @@
     (LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 27) &&
LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)) || \
     (LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 8) &&
LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)) || \
     (LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 40) &&
LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0)) || \
-    (LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 54))) && !defined(ISUBUNTU1404)
+    (LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 54))) &&
!defined(ISUBUNTU1404) && !defined(ISRHEL7)
 #include <linux/if.h>
 #include <net/ip_tunnels.h>
 #define IP6_ECN_set_ce(a, b) IP6_ECN_set_ce(b)
_______________________________________________
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-10 20:42 RHEL8 compatibility Robert-André Mauchin
2019-09-10 21:18 ` Robert-André Mauchin
2019-09-11 16:49   ` Jason A. Donenfeld

WireGuard Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/wireguard/0 wireguard/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 wireguard wireguard/ https://lore.kernel.org/wireguard \
		wireguard@lists.zx2c4.com zx2c4-wireguard@archiver.kernel.org
	public-inbox-index wireguard

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/com.zx2c4.lists.wireguard


AGPL code for this site: git clone https://public-inbox.org/ public-inbox