[PR #1913] [MERGED] Fix removeAllowedIP #16018

Open
opened 2026-08-05 03:08:48 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/1913
Author: @hurricanehrndz
Created: 5/2/2024
Status: Merged
Merged: 5/6/2024
Merged by: @lixmal

Base: mainHead: fix/uswg_removeallowedip


📝 Commits (1)

📊 Changes

1 file changed (+18 additions, -8 deletions)

View changed files

📝 iface/wg_configurer_usp.go (+18 -8)

📄 Description

Current implementation of removeAllowedIP recreates the wg iface, killing all open ports and connections. This is due to that "lines" is the complete output of get from wg-usp and not the specific interface which changes should be applied to.

Describe your changes

Refactor removeallowedip to be similar to addallowedip.

fixes #1912

Checklist

  • [ x] Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

🔄 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/netbirdio/netbird/pull/1913 **Author:** [@hurricanehrndz](https://github.com/hurricanehrndz) **Created:** 5/2/2024 **Status:** ✅ Merged **Merged:** 5/6/2024 **Merged by:** [@lixmal](https://github.com/lixmal) **Base:** `main` ← **Head:** `fix/uswg_removeallowedip` --- ### 📝 Commits (1) - [`be44d1c`](https://github.com/netbirdio/netbird/commit/be44d1c8e41658a3a39dc201cae1f0566bd528af) Fix removeAllowedIP ### 📊 Changes **1 file changed** (+18 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `iface/wg_configurer_usp.go` (+18 -8) </details> ### 📄 Description Current implementation of removeAllowedIP recreates the wg iface, killing all open ports and connections. This is due to that "lines" is the complete output of `get` from wg-usp and not the specific interface which changes should be applied to. ## Describe your changes Refactor removeallowedip to be similar to addallowedip. ## Issue ticket number and link fixes #1912 ### Checklist - [ x] Is it a bug fix - [ ] Is a typo/documentation fix - [ ] Is a feature enhancement - [ ] It is a refactor - [ ] Created tests that fail without the change (if possible) - [ ] Extended the README / documentation, if necessary --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 03:08:48 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#16018