Development discussion of WireGuard
 help / color / mirror / Atom feed
From: Benedikt Braunger <b.braunger@syseleven.de>
To: wireguard@lists.zx2c4.com
Subject: Re: [PATCH] added ipv6_dst_lookup_flow define for VZ7 kernels
Date: Wed, 17 Mar 2021 13:36:25 +0100	[thread overview]
Message-ID: <6ea1abc2-7620-3832-1c70-040c1b9fe309@syseleven.de> (raw)
In-Reply-To: <20210304183018.42658-1-b.braunger@syseleven.de>

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
>  

      reply	other threads:[~2021-03-17 12:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-04 18:30 Benedikt Braunger
2021-03-17 12:36 ` Benedikt Braunger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6ea1abc2-7620-3832-1c70-040c1b9fe309@syseleven.de \
    --to=b.braunger@syseleven.de \
    --cc=wireguard@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).