mirror of
https://github.com/amnezia-vpn/amneziawg-linux-kernel-module.git
synced 2026-10-13 21:34:34 +00:00
[PR #241] fix: stop netlink dump on no progress #256
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#256
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/241
Author: @HeisLuka
Created: 9/14/2026
Status: 🔄 Open
Base:
master← Head:fix/netlink-dump-no-progress📝 Commits (1)
8047fd9fix: stop netlink dump on no progress📊 Changes
1 file changed (+9 additions, -1 deletions)
View changed files
📝
src/netlink.c(+9 -1)📄 Description
Summary
Stop
wg_get_device_dump()from returning the same multipart dump stateforever when the next peer cannot fit in the current netlink message.
When
get_peer()fails with-EMSGSIZE, the dump now distinguishes between:emitted earlier peers; and
not advance.
In the no-progress case the dump returns
-EMSGSIZEinstead of returning anon-zero skb length with an unchanged cursor. This prevents userspace from
receiving the same device-only message indefinitely.
Allowed-IP pagination is preserved because that path leaves serialized peer
data in the skb and stores
ctx->next_allowedip.Why this matters
Large I1-I5 device attributes can leave too little space for even the first
peer. In that state the old code left
ctx->next_peerunchanged and returnedskb->len, so the next dump callback repeated the same message forever.This can make
awg showhang and consume large amounts of CPU/memory.Fixes #228
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.