mirror of
https://github.com/amnezia-vpn/amneziawg-linux-kernel-module.git
synced 2026-10-14 05:41:56 +00:00
[GH-ISSUE #196] feat/awg3: PersistentKeepalive breaks setconf (EINVAL) — tools send string attr, kernel still reads u16 #112
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#112
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 @sysbedlam on GitHub (Jul 28, 2026).
Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/issues/196
Summary
On
feat/awg3,PersistentKeepalive(any value — plain integer or range) makesawg setconffail withUnable to modify interface: Invalid argument. Every other new AWG3 field (HeaderProtectionKey,ContentPaddingAddition, timing ranges) plus all existing v1/v2 obfuscation fields (Jc/Jmin/Jmax,S1-S4,H1-H4ranges,I1tags) work fine — isolated this down toPersistentKeepalivespecifically.Root cause (cross-repo mismatch)
amneziawg-tools(feat/awg3, commit05434ca) —src/ipc-linux.h:260now writes this peer attribute as a string, presumably to support the new range syntax (20-30) documented for this field:amneziawg-linux-kernel-module(feat/awg3, commitf4cd9df) —src/netlink.c:724still reads this attribute as a raw u16: andsrc/peer.h:57still declares it as a plain scalar, not a range type:So tools sends a null-terminated string attribute, the kernel tries to read it with
nla_get_u16(expects a fixed 2-byte binary payload) → attribute validation fails →setconfreturnsEINVALregardless of the value's format (confirmed with bothPersistentKeepalive = 25andPersistentKeepalive = 20-30).Steps to reproduce
Built both repos at the commits above against a stock Ubuntu 22.04 kernel (5.15.0-186-generic), loaded the new kmod (clean load, no dmesg errors), then:
Removing the
PersistentKeepaliveline alone makes the exact same config apply cleanly. Also confirmed the range form (PersistentKeepalive = 20-30) fails identically.Expected
setconfacceptsPersistentKeepalive(either scalar or range form, per the README's documentedrange,xtype) without error.Notes
PersistentKeepaliverange support needed there) — only this one field is affected.@ygurov commented on GitHub (Jul 29, 2026):
Hi @sysbedlam,
AWG 3.0 is not yet fully released. Please standby.
It will happen in a day or two