[PR #144] Fix: Junk packets can go in wrong order if device is behind QoS #203

Open
opened 2026-10-13 21:07:35 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/pull/144
Author: @danpashin
Created: 3/5/2026
Status: 🔄 Open

Base: master ← Head: fix/dscp


📝 Commits (1)

  • 6f71e1a Fix: Junk packets can go in wrong order if device is behind QoS

📊 Changes

2 files changed (+6 additions, -5 deletions)

View changed files

📝 src/messages.h (+4 -1)
📝 src/send.c (+2 -4)

📄 Description

Description

WG handshake packets have AF41 priority while I1-I5 are CS0 and JC is a random value. This behaviour can cause handshake to be processed before all other packets on a device with QoS enabled and break junk flow (on the screenshot). Thus TSPU will apply throttling policies to the flow.

packets chaos

Fix

Replace invalid DSCP values with EF (which is more prioritized than AF41) for junk and leave handshake one (AF41) as is.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/pull/144 **Author:** [@danpashin](https://github.com/danpashin) **Created:** 3/5/2026 **Status:** 🔄 Open **Base:** `master` ← **Head:** `fix/dscp` --- ### 📝 Commits (1) - [`6f71e1a`](https://github.com/amnezia-vpn/amneziawg-linux-kernel-module/commit/6f71e1a722136fef8f6f7327076eccda078ab5c1) Fix: Junk packets can go in wrong order if device is behind QoS ### 📊 Changes **2 files changed** (+6 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `src/messages.h` (+4 -1) 📝 `src/send.c` (+2 -4) </details> ### 📄 Description ## Description WG handshake packets have `AF41` priority while I1-I5 are `CS0` and JC is a `random` value. This behaviour can cause handshake to be processed before all other packets on a device with QoS enabled and break junk flow (on the screenshot). Thus TSPU will apply throttling policies to the flow. <img width="3326" height="426" alt="packets chaos" src="https://github.com/user-attachments/assets/4c214bcc-61e5-431d-a9b6-b0450a5ec095" /> ## Fix Replace invalid DSCP values with `EF` (which is more prioritized than `AF41`) for junk and leave handshake one (AF41) as is. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
amnezia-vpn/amneziawg-linux-kernel-module#203
No description provided.