Development discussion of WireGuard
 help / color / mirror / Atom feed
* Ubuntu kernel >= 5.3.0-52.46 breaks DKMS build for wireguard-linux-compat >= 1.0.20200429, patch included
@ 2020-05-03 20:33 Pascal Ernster
  2020-05-05  1:37 ` Jason A. Donenfeld
  0 siblings, 1 reply; 8+ messages in thread
From: Pascal Ernster @ 2020-05-03 20:33 UTC (permalink / raw)
  To: wireguard

[-- Attachment #1: Type: text/plain, Size: 792 bytes --]

Hi,


Ubuntu kernel 5.3.0-52.46 breaks the DKMS build for
wireguard-linux-compat 1.0.20200429. Function skb_reset_redirect() got
added to the kernel's include/linux/skbuff.h, but collides with the
function defintion from wireguard-linux-compat's compat/compat.h:

https://kernel.ubuntu.com/git/ubuntu/ubuntu-eoan.git/commit/include/linux/skbuff.h?h=Ubuntu-5.3.0-52.46&id=b8845f9376917c49f5e219288613c6cbe172f884

Kernel 5.3.0-52.46 is not only used for Ubuntu 19.10, but serves also as
HWE kernel in Ubuntu 18.04.

I've got the DKMS module to compile again on Ubuntu 18.04 using the
attached patch, but I'm not sure it that's the correct solution to the
problem since the colliding function definitions differ and I'm not
really familiar with the kernel's network internals.


Regards
Pascal

[-- Attachment #2: fix-for-ubuntu-kernel-5.3.0-52.46.patch --]
[-- Type: text/x-patch, Size: 860 bytes --]

--- /var/lib/dkms/wireguard/1.0.20200429/source/compat/compat.h	2020-04-30 23:03:40.000000000 +0000
+++ /var/lib/dkms/wireguard/1.0.20200429/source/compat/compat.h	2020-04-30 23:03:40.000000000 +0000
@@ -1021,12 +1021,14 @@ out:
 #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 29) || (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 5, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(5, 5, 14))
 #include <linux/skbuff.h>
 #include <net/sch_generic.h>
+#if !(defined(UTS_UBUNTU_RELEASE_ABI) && (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 3, 18)) && (LINUX_VERSION_CODE < KERNEL_VERSION(5, 4, 0)) && (UTS_UBUNTU_RELEASE_ABI >= 52)) // Ubuntu 18.04-HWE and 19.10 >= 5.3.0-52.46
 static inline void skb_reset_redirect(struct sk_buff *skb)
 {
 #ifdef CONFIG_NET_SCHED
 	skb_reset_tc(skb);
 #endif
 }
+#endif
 #endif
 
 #if defined(ISUBUNTU1604) || defined(ISRHEL7)

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

end of thread, other threads:[~2020-05-20 15:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-03 20:33 Ubuntu kernel >= 5.3.0-52.46 breaks DKMS build for wireguard-linux-compat >= 1.0.20200429, patch included Pascal Ernster
2020-05-05  1:37 ` Jason A. Donenfeld
2020-05-05  3:52   ` Pascal Ernster
2020-05-05  4:03     ` Jason A. Donenfeld
2020-05-05  4:27       ` Pascal Ernster
2020-05-06 16:22       ` Simon Deziel
2020-05-07  0:29         ` Jason A. Donenfeld
2020-05-20 15:04         ` Vasili Pupkin

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).