mirror of
https://github.com/amnezia-vpn/amneziawg-linux-kernel-module.git
synced 2026-10-13 21:34:34 +00:00
[GH-ISSUE #198] AWG 3.0: PersistentKeepalive always rejected with EINVAL (netlink policy says NLA_U64, code reads u32) #115
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#115
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 @nd4y on GitHub (Jul 31, 2026).
Original GitHub issue: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/issues/198
Since the AmneziaWG 3.0 merge (
b6ca11f), settingPersistentKeepaliveon any peer fails:Removing the
PersistentKeepaliveline from the peer makes the very same config apply cleanly, so nothing else in the config is involved. Every value and syntax is rejected —25,25-25,20-30,15-25.Root cause
The netlink policy declares the attribute as
NLA_U64:https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/blob/master/src/netlink.c#L77
but the value is read as a 32-bit
u16_range_t:and
amneziawg-toolssends 4 bytes for protocol version >= 3 (src/ipc-linux.h):NLA_U64makesnla_parse_nested()require an 8-byte payload, so the 4-byte attribute is rejected before the handler ever runs — henceEINVALfor every value.For comparison, the device-level range attributes that are also
u16_range_tare declaredNLA_U32indevice_policy, which is consistent with how they are read.Fix
With that one-line change applied before building,
PersistentKeepaliveis accepted and shows up correctly:Environment
3.0.20260730built frommastervia DKMSamneziawg-tools v3.0.20260730@ygurov commented on GitHub (Jul 31, 2026):
OMG, thanks for finding this one. Let me put a hotfix PR
@ygurov commented on GitHub (Jul 31, 2026):
Fixed by https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/pull/199
Thanks @nd4y for your contribution!