Den 01-04-2020 kl. 15:48, skrev Roman Mamedov:
On Mon, 30 Mar 2020 18:19:17 -0600
"Jason A. Donenfeld" <[email protected]> wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hello,

A new version, v1.0.20200330, of the backported WireGuard kernel module for
3.10 <= Linux <= 5.5.y has been tagged in the git repository.
My kernel build for 5.4.29 has failed just now:

In file included from <command-line>:
././net/wireguard/compat/compat.h:1029:20: error: redefinition of 
‘skb_reset_redirect’
  static inline void skb_reset_redirect(struct sk_buff *skb)
                     ^~~~~~~~~~~~~~~~~~
In file included from ././net/wireguard/compat/compat.h:878,
                  from <command-line>:
./include/linux/skbuff.h:4538:20: note: previous definition of 
‘skb_reset_redirect’ was here
  static inline void skb_reset_redirect(struct sk_buff *skb)
                     ^~~~~~~~~~~~~~~~~~
In file included from <command-line>:
././net/wireguard/compat/compat.h: In function ‘skb_reset_redirect’:
././net/wireguard/compat/compat.h:1032:2: error: implicit declaration of 
function ‘skb_reset_tc’; did you mean ‘skb_reserve’? 
[-Werror=implicit-function-declaration]
   skb_reset_tc(skb);
   ^~~~~~~~~~~~
   skb_reserve
cc1: some warnings being treated as errors
scripts/Makefile.build:265: recipe for target 'net/wireguard/main.o' failed
make[3]: *** [net/wireguard/main.o] Error 1
scripts/Makefile.build:500: recipe for target 'net/wireguard' failed
make[2]: *** [net/wireguard] Error 2


This is because the skb_reset_redirect() change from 5.6 got backported in 5.5.14 and 5.4.29, so you need the attached patch


--

Thomas


Fix skb_reset_redirect() backport version check.

Upstream commit 2c64605b590edadb3fb46d1ec6badb49e940b479 got backported in
stable 5.5.14 and 5.4.29, so we need to adjust the version check.

Signed-off-by: Thomas Backlund <[email protected]>

--- a/net/wireguard/compat/compat.h
+++ b/net/wireguard/compat/compat.h
@@ -1024,7 +1024,7 @@ out:
 #define COMPAT_CANNOT_USE_MAX_MTU
 #endif
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 6, 0)
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 5, 14) && LINUX_VERSION_CODE >= KERNEL_VERSION(5, 5, 0)) || LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 29)
 #include <linux/skbuff.h>
 static inline void skb_reset_redirect(struct sk_buff *skb)
 {

Reply via email to