[PR #74] fix: omit empty AWG 3.x ranges from showconf #75

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

📋 Pull Request Information

Original PR: https://github.com/amnezia-vpn/amneziawg-tools/pull/74
Author: @HeisLuka
Created: 9/14/2026
Status: 🔄 Open

Base: master ← Head: fix/showconf-hide-empty-ranges


📝 Commits (1)

  • 005ddd2 fix: omit empty AWG 3.x ranges from showconf

📊 Changes

1 file changed (+6 additions, -6 deletions)

View changed files

📝 src/showconf.c (+6 -6)

📄 Description

Summary

Do not print empty AWG 3.x range parameters from awg showconf.

The kernel can report these attributes with their corresponding WGDEVICE_HAS_* flags set while the packed range itself is zero. showconf previously checked only the flags, so a plain AWG 2.x interface could be serialized with six synthetic AWG 3.x settings such as:

ContentPaddingAddition = 0
RekeyAfterTime = 0
RekeyTimeout = 0
RejectAfterTime = 0
KeepaliveTimeout = 0
MaxHandshakeAttempts = 0

Use u16_range_is_zero() for the six range-valued fields, matching the existing behavior of awg show and persistent keepalive output.

Non-empty ranges are unchanged.

Fixes #61


🔄 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-tools/pull/74 **Author:** [@HeisLuka](https://github.com/HeisLuka) **Created:** 9/14/2026 **Status:** 🔄 Open **Base:** `master` ← **Head:** `fix/showconf-hide-empty-ranges` --- ### 📝 Commits (1) - [`005ddd2`](https://github.com/amnezia-vpn/amneziawg-tools/commit/005ddd297235d8a4132a23259a446cc77fd335fd) fix: omit empty AWG 3.x ranges from showconf ### 📊 Changes **1 file changed** (+6 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `src/showconf.c` (+6 -6) </details> ### 📄 Description ## Summary Do not print empty AWG 3.x range parameters from `awg showconf`. The kernel can report these attributes with their corresponding `WGDEVICE_HAS_*` flags set while the packed range itself is zero. `showconf` previously checked only the flags, so a plain AWG 2.x interface could be serialized with six synthetic AWG 3.x settings such as: ```text ContentPaddingAddition = 0 RekeyAfterTime = 0 RekeyTimeout = 0 RejectAfterTime = 0 KeepaliveTimeout = 0 MaxHandshakeAttempts = 0 ``` Use `u16_range_is_zero()` for the six range-valued fields, matching the existing behavior of `awg show` and persistent keepalive output. Non-empty ranges are unchanged. Fixes #61 --- <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-tools#75
No description provided.