mirror of
https://github.com/amnezia-vpn/amneziawg-linux-kernel-module.git
synced 2026-10-13 21:34:34 +00:00
[PR #258] compat: detect RHEL 10 backports from kernel headers #265
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#265
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?
📋 Pull Request Information
Original PR: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/pull/258
Author: @ih-v
Created: 10/2/2026
Status: 🔄 Open
Base:
master← Head:compat-rhel10-backports📝 Commits (1)
2b08754compat: detect RHEL 10 backports from kernel headers📊 Changes
2 files changed (+26 additions, -5 deletions)
View changed files
📝
src/compat/Kbuild.include(+21 -0)📝
src/compat/compat.h(+5 -5)📄 Description
EL10 kernels report 6.12 in
LINUX_VERSION_CODEbut carry APIs from 6.15–6.18, so several version-gated shims incompat.hcollide with the real thing. This detects each backport from the kernel's own headers inKbuild.include, the waycrypto_memneqandaddr_gen_modeare already detected, and skips the shim when the kernel has it.Fixes #173.
timer_container_ofnetif_threaded_enableWQ_PERCPUstruct sockaddr_inetstruct rtnl_newlink_paramsmastertodaynetif_threaded_enableOne of these does not show up as a build failure:
WQ_PERCPUis an enum on these kernels, so#define WQ_PERCPU 0quietly replaces the flag thatb72bb7a6started passing.A check on
RHEL_MINORwould not work instead. The backports differ between minors, and Stream already has two that no released RHEL has yet.Testing. Built against kernel-devel of RHEL 10.0 (6.12.0-55.9.1, 55.43.1), 10.1 (124.8.1, 124.56.5), 10.2 (211.7.1, 211.56.1) (AlmaLinux packages, first and latest of each minor) and CentOS Stream 10 6.12.0-271: no errors, no redefinition warnings. Without the patch, 10.2 and Stream fail as above, and 10.0/10.1 build either way. On Stream the patched module was also loaded and passed an end-to-end run, including a handshake with amneziawg-go v3.1.20260828 using a 3.1 profile (header protection, S1–S4, H ranges, I1). Mainline kernels take the same paths as before: the version check still decides first.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.