mirror of
https://github.com/amnezia-vpn/amneziawg-linux-kernel-module.git
synced 2026-10-14 05:41:56 +00:00
[GH-ISSUE #204] AmneziaWG 3.0 module fails to build on kernels < 6.7 (nla_put_uint) - Debian 12, Ubuntu 22.04 #120
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#120
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 @bivlked on GitHub (Jul 31, 2026).
Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/issues/204
Originally assigned to: @ygurov on GitHub.
After the AmneziaWG 3.0 merge (#192) the module no longer builds on kernels older than 6.7.
src/netlink.c:448callsnla_put_uint()for the H1-H4 attributes, and that helper only landed in mainline 6.7. There's no compat shim, so on older kernels the build fails:I hit this on a clean Debian 12 (bookworm), kernel 6.1.0-51-amd64, building the current PPA
amneziawg-dkms(the 3.0 build, commit7cf785d) withdkms build. It applies to any pre-6.7 kernel: Ubuntu 22.04 (5.15), Raspberry Pi OS bookworm (6.6), and so on.Since the PPA switched to 3.0, this now breaks a fresh
apt install amneziawgon Debian 12: the DKMS build fails in the postinst and dpkg leaves the packages unconfigured.The 1.0.x line (last tag
v1.0.20260725) still builds on these kernels, since it usesnla_put_stringfor the headers. Looks like a different root cause from #190 (ipv6_stub undeclaredon a 7.1 sid kernel, i.e. too new; this one is too old).A compat definition for
nla_put_uintinsrc/compat/compat.hfor kernels < 6.7 would fix it. Happy to test a patch on Debian 12 / 6.1.@ygurov commented on GitHub (Jul 31, 2026):
Hi @bivlked,
Thanks for reporting the issue. Made a PR to use the plain nla_put calls, please check if it works fine for you
https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/pull/205
@ygurov commented on GitHub (Jul 31, 2026):
Fixed in
github.com/amnezia-vpn/amneziawg-linux-kernel-module@c78a89ee19, introduced v3.0.20260731-04@rhclayto commented on GitHub (Jul 31, 2026):
Will this be in the PPA soon? Or is there a way to manually apply this before it gets into the PPA?
@bivlked commented on GitHub (Aug 1, 2026):
@ygurov works here, thanks for turning it around the same evening. Debian 12, kernel 6.1.0-51:
apt install amneziawg-dkmsgoes through, DKMS builds against 6.1 with noimplicit declaration of function 'nla_put_uint', and the module loads as 3.0.20260731-04.awg-quick upthen brings up an interface with AmneziaWG 2.0 parameters, andawg showreads H1-H4 back correctly, which is the part the patch changed. Userspace tools are still v3.0.20260730 and work fine against the -04 module.@rhclayto it is already in the PPA, nothing to apply by hand. The build is published for all three series, so both cases from the issue title are covered:
1.0.0-0~202608010143+c78a89e~ubuntu20.04.11.0.0-0~202608010158+c78a89e~ubuntu22.04.11.0.0-0~202608010147+c78a89e~ubuntu24.04.1So
apt update && apt install amneziawg-dkmsis enough. There are no Debian builds in the PPA, so on Debian 12 apt points at the focal series - same thing my installer does.Two things worth knowing if the build still fails after the upgrade:
amneziawg-dkmshalf-configured, and the new version will not install on top of that:apt purge amneziawg-dkms amneziawgandrm -rf /usr/src/amneziawg-*first;apt full-upgradeand reboot before installing.