mirror of
https://github.com/amnezia-vpn/amneziawg-linux-kernel-module.git
synced 2026-10-13 21:34:34 +00:00
[PR #244] compat: support header protection on kernels before 5.5 #257
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#257
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/244
Author: @HeisLuka
Created: 9/14/2026
Status: 🔄 Open
Base:
master← Head:fix/compat-header-protection-chacha📝 Commits (1)
5a8acb6compat: provide ChaCha API for old kernels📊 Changes
2 files changed (+51 additions, -0 deletions)
View changed files
📝
src/compat/Kbuild.include(+4 -0)➕
src/compat/crypto/chacha/include/crypto/chacha.h(+47 -0)📄 Description
Summary
Provide the ChaCha library API required by AWG 3.x header protection on kernels older than 5.5.
The existing compatibility layer already adapts the Linux 5.5–6.15
u32 *stateChaCha API to the newer
struct chacha_stateinterface. On older kernels,however,
<crypto/chacha.h>either does not exist or exposes the olderskcipher-oriented API, so that compatibility layer cannot build.
For kernels before 5.5 this change shadows
<crypto/chacha.h>with a smallcompatibility header backed by the module's existing bundled Zinc ChaCha20
implementation. It exposes the
chacha_init(u32 *state, ...)andchacha20_crypt(u32 *state, ...)API expected by the existing compatibilitycode.
The state layout is kept identical to the 16-word ChaCha state used by the
kernel library API, including the counter words, so the existing
header-protection receive path can rewind
state.x[12]exactly as before.Scope
Fixes #210
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.