Development discussion of WireGuard
 help / color / mirror / Atom feed
* [PATCH] added ipv6_dst_lookup_flow define for VZ7 kernels
@ 2021-03-04 18:30 Benedikt Braunger
  2021-03-17 12:36 ` Benedikt Braunger
  0 siblings, 1 reply; 2+ messages in thread
From: Benedikt Braunger @ 2021-03-04 18:30 UTC (permalink / raw)
  To: wireguard

This patch adds an additional check for OpenVZ / Virtuozzo 7 custom
kernels to ensure ipv6_dst_lookup_flow is defined.
It also splits the very long version checking into multiple lines for
better reading.

Signed-off-by: Benedikt Braunger <b.braunger@syseleven.de>
---
Since the error mentioned in "Wireguard DKMS build on OpenVZ 7" still
occures, I searched for a way to check if the module is compiled on 
a VZ kernel. This patch works for me, I tested on Virtuozzo 7 and 
plain CentOS 7. Can compile on both without error and the module is
loadable.
Probably Virtuozzo will backuport ipv6_dst_lookup_flow some day but
they can't (or don't want to) tell me when.
If so one can compare VZVERSION to the current one to ensure the definition
for older verions.

 src/compat/compat.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/compat/compat.h b/src/compat/compat.h
index 3e8e005..7700e7b 100644
--- a/src/compat/compat.h
+++ b/src/compat/compat.h
@@ -91,7 +91,13 @@
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0) && LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 83)
 #define ipv6_dst_lookup_flow(a, b, c, d) ipv6_dst_lookup_flow(b, c, d)
-#elif (LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 5) && LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(5, 3, 18) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0) && !defined(ISUBUNTU1904)) || (!defined(ISRHEL8) && !defined(ISDEBIAN) && !defined(ISUBUNTU1804) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 119) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 181) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 224) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 224) && !defined(ISUBUNTU1604) && !defined(ISRHEL7))
+#elif (LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 5) && LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0))\
+  || (LINUX_VERSION_CODE < KERNEL_VERSION(5, 3, 18) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0) && !defined(ISUBUNTU1904))\
+  || (!defined(ISRHEL8) && !defined(ISDEBIAN) && !defined(ISUBUNTU1804) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 119) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0))\
+  || (LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 181) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0))\
+  || (LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 224) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0))\
+  || (LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 224) && !defined(ISUBUNTU1604) && !defined(ISRHEL7))\
+  || (LINUX_VERSION_CODE == KERNEL_VERSION(3, 10, 0) && defined(ISRHEL7) && defined(VZVERSION))
 #define ipv6_dst_lookup_flow(a, b, c, d) ipv6_dst_lookup(a, b, &dst, c) + (void *)0 ?: dst
 #endif
 
-- 
2.25.1


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

* Re: [PATCH] added ipv6_dst_lookup_flow define for VZ7 kernels
  2021-03-04 18:30 [PATCH] added ipv6_dst_lookup_flow define for VZ7 kernels Benedikt Braunger
@ 2021-03-17 12:36 ` Benedikt Braunger
  0 siblings, 0 replies; 2+ messages in thread
From: Benedikt Braunger @ 2021-03-17 12:36 UTC (permalink / raw)
  To: wireguard

Hi,

Is anything blocking this from getting merged into wireguard-compat?

Regards,
Beni

On 3/4/21 7:30 PM, Benedikt Braunger wrote:
> This patch adds an additional check for OpenVZ / Virtuozzo 7 custom
> kernels to ensure ipv6_dst_lookup_flow is defined.
> It also splits the very long version checking into multiple lines for
> better reading.
>
> Signed-off-by: Benedikt Braunger <b.braunger@syseleven.de>
> ---
> Since the error mentioned in "Wireguard DKMS build on OpenVZ 7" still
> occures, I searched for a way to check if the module is compiled on 
> a VZ kernel. This patch works for me, I tested on Virtuozzo 7 and 
> plain CentOS 7. Can compile on both without error and the module is
> loadable.
> Probably Virtuozzo will backuport ipv6_dst_lookup_flow some day but
> they can't (or don't want to) tell me when.
> If so one can compare VZVERSION to the current one to ensure the definition
> for older verions.
>
>  src/compat/compat.h | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/src/compat/compat.h b/src/compat/compat.h
> index 3e8e005..7700e7b 100644
> --- a/src/compat/compat.h
> +++ b/src/compat/compat.h
> @@ -91,7 +91,13 @@
>  
>  #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0) && LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 83)
>  #define ipv6_dst_lookup_flow(a, b, c, d) ipv6_dst_lookup_flow(b, c, d)
> -#elif (LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 5) && LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(5, 3, 18) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0) && !defined(ISUBUNTU1904)) || (!defined(ISRHEL8) && !defined(ISDEBIAN) && !defined(ISUBUNTU1804) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 119) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 181) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 224) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)) || (LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 224) && !defined(ISUBUNTU1604) && !defined(ISRHEL7))
> +#elif (LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 5) && LINUX_VERSION_CODE >= KERNEL_VERSION(5, 4, 0))\
> +  || (LINUX_VERSION_CODE < KERNEL_VERSION(5, 3, 18) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0) && !defined(ISUBUNTU1904))\
> +  || (!defined(ISRHEL8) && !defined(ISDEBIAN) && !defined(ISUBUNTU1804) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 19, 119) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0))\
> +  || (LINUX_VERSION_CODE < KERNEL_VERSION(4, 14, 181) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0))\
> +  || (LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 224) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0))\
> +  || (LINUX_VERSION_CODE < KERNEL_VERSION(4, 4, 224) && !defined(ISUBUNTU1604) && !defined(ISRHEL7))\
> +  || (LINUX_VERSION_CODE == KERNEL_VERSION(3, 10, 0) && defined(ISRHEL7) && defined(VZVERSION))
>  #define ipv6_dst_lookup_flow(a, b, c, d) ipv6_dst_lookup(a, b, &dst, c) + (void *)0 ?: dst
>  #endif
>  

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

end of thread, other threads:[~2021-03-17 12:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-04 18:30 [PATCH] added ipv6_dst_lookup_flow define for VZ7 kernels Benedikt Braunger
2021-03-17 12:36 ` Benedikt Braunger

Development discussion of WireGuard

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.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/ http://inbox.vuxu.org/wireguard \
		wireguard@lists.zx2c4.com
	public-inbox-index wireguard

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.wireguard


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