mirror of
https://github.com/amnezia-vpn/amneziawg-linux-kernel-module.git
synced 2026-10-13 21:34:34 +00:00
[GH-ISSUE #259] Incompatibility with Ubuntu 26.04 7.0.0-38 kernel #142
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
amnezia-vpn/amneziawg-linux-kernel-module#142
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @LDVSOFT on GitHub (Oct 3, 2026).
Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/issues/259
Compilation fails when updating linux kernel on Ubuntu 26.04 to most recent 7.0.0-38 with:
In checking the Linux headers: 7.0.0-34 had
and 7.0.0-38 has
Looks like OpenVPN had a similar fate: https://github.com/OpenVPN/ovpn-dco/issues/103.
@LDVSOFT commented on GitHub (Oct 3, 2026):
It seems that the fix that changed function signature in 7.1.5 was back-ported into previous branch? We might need to update compat.h version check.
@LDVSOFT commented on GitHub (Oct 3, 2026):
Unfortunately I don't see how one can probe vanilla Linux header for a check if the fix was backported. All version headers contain the same stuff, so either the check shall go autotools-style with probing, or at the very least with grep-ping the headers.
One might argue that Ubuntu here changed Linux API without changing a version. I'll look for a Launchpad ticket.
@SignFinder commented on GitHub (Oct 3, 2026):
That is a workaround to boot previous kernel - 6.8.0-146-generic. It is still in grub.
And block from autoremove
@LDVSOFT commented on GitHub (Oct 3, 2026):
Wrong, we can look at
UTS_UBUNTU_RELEASE_ABIinutsrelease.h. HOWEVER they only changedsetup_udp_tunnel_sock.Changing compat.h to have:
seemed to help! I don't know how helpful it is for the general support.
@LDVSOFT commented on GitHub (Oct 3, 2026):
I've filled an issue on Launchpad to confirm the change https://bugs.launchpad.net/ubuntu/+source/linux-hwe-7.0/+bug/2169429
@Kyoto-sh commented on GitHub (Oct 4, 2026):
I've also run into this problem. As far as I understand, shouldn't the AWG developers fix this somehow and add support for this kernel?
@bivlked commented on GitHub (Oct 5, 2026):
@LDVSOFT's guess about a backport is right: the changelog of Ubuntu's
linux 7.0.0-38.38has "udp_tunnel: Pass struct sock to setup_udp_tunnel_sock()", the upstream 7.1.5 change. The same backport is in the 24.04 HWE kernel7.0.0-38~24.04.4, and7.0.0-39(still in -proposed) keeps the new signature.Because of that, a check by version or ABI number has to track every such kernel. The approach in #218 avoids it: it looks at the
setup_udp_tunnel_socksignature in the kernel headers. We built the module with that change on Debian 12 and 13, Ubuntu 24.04 (6.8 and HWE 7.0.0-38), 25.10 and 26.04 (7.0.0-34, -38 and -39), and it compiled on all of them.If you use amneziawg-installer, v5.37.1 applies that change to the module source before DKMS builds it (only to the PPA source it was tested with), so a kernel update to 7.0.0-38 goes through without manual steps. A server installed with an older version needs one run of
--repair-module; the commands, with the signature check, are in ADVANCED. For a manual install, booting the previous kernel (as @SignFinder showed) or applying #218 by hand works until a fixed source comes from the PPA.@CptTZ commented on GitHub (Oct 5, 2026):
fyi I tried #262 and it worked,
however i think that PR is too rough.Raised my own PR #265 which avoids hardcoded implementation.
@LDVSOFT commented on GitHub (Oct 6, 2026):
@bivlked OH THAT'S WHAT I WANTED TO DO but I'm not that profficent in C compatability macros. I tried looking up
_Generictricks but they don't work for function parameter type.@shvchk commented on GitHub (Oct 12, 2026):
Until proper fix is released, here's how to patch manually with the code from #218 (maybe #265 is better, though, idk):
I'm feeling lucky mode:
Expected
sha256sum /usr/src/amneziawg-1.0.0/compat/compat.h:b14346040ce0188c47e2db2baad1a4f21aa784510f6c95bbb4aa58d5bbe691c98d47a358b4df0b2187788ce6f88ad63128218de1be22c78b263ef3e5d770c26bAfter patching do
sudo dpkg --configure -a