Userspace implementation of RemoveAllowedIP recreates wireguard iface #838

Closed
opened 2025-11-20 05:18:26 -05:00 by saavagebueno · 3 comments
Owner

Originally created by @hurricanehrndz on GitHub (May 2, 2024).

Describe the problem

RemoveAllowedIP is not an update operation. Because of this when this function is called on platforms depending on the user space implementation of wireguard it results in all connections being dropped because it tries to use a port that is already in use.

To Reproduce

Steps to reproduce the behavior:
Deselect one of the routes from the new "Network Routes" menu

Expected behavior

Expect removing an IP from peer ACL does not recreate wireguard interface

Are you using NetBird Cloud?
NA

NetBird version

main

NetBird status -d output:

Not applicable

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

Originally created by @hurricanehrndz on GitHub (May 2, 2024). **Describe the problem** [RemoveAllowedIP](https://github.com/netbirdio/netbird/blob/main/iface/wg_configurer_usp.go#L121C35-L121C40) is not an update operation. Because of this when this function is called on platforms depending on the user space implementation of wireguard it results in all connections being dropped because it tries to use a port that is already in use. **To Reproduce** Steps to reproduce the behavior: Deselect one of the routes from the new "Network Routes" menu **Expected behavior** Expect removing an IP from peer ACL does not recreate wireguard interface **Are you using NetBird Cloud?** NA **NetBird version** main **NetBird status -d output:** Not applicable **Screenshots** If applicable, add screenshots to help explain your problem. **Additional context** Add any other context about the problem here.
saavagebueno added the triage-needed label 2025-11-20 05:18:26 -05:00
Author
Owner

@hurricanehrndz commented on GitHub (May 2, 2024):

@mlsmaycon latency base routing will not work without fixing this bug, because routes need to be successfully removed from allowed list without recreating wg iface

@hurricanehrndz commented on GitHub (May 2, 2024): @mlsmaycon latency base routing will not work without fixing this bug, because routes need to be successfully removed from allowed list without recreating wg iface
Author
Owner

@hurricanehrndz commented on GitHub (May 2, 2024):

I have a patch that fixes this

@hurricanehrndz commented on GitHub (May 2, 2024): I have a patch that fixes this
Author
Owner

@mlsmaycon commented on GitHub (May 2, 2024):

Ok, thanks @hurricanehrndz we will review it soon after you open the PR.

@mlsmaycon commented on GitHub (May 2, 2024): Ok, thanks @hurricanehrndz we will review it soon after you open the PR.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#838