[PR #3747] [client] Automatically start the connection if exclude list is changing #3907

Open
opened 2025-11-20 08:07:19 -05:00 by saavagebueno · 0 comments
Owner

Original Pull Request: https://github.com/netbirdio/netbird/pull/3747

State: closed
Merged: Yes


Describe your changes

Fix the exclude list handling. When the agent gets a new network map, it manages the changes in the excluded peers.

Cases:

  • Extend the exclude list with a new peer: start permanent peer connection
  • Remove a peer from the exclude list: we do not know the actual state of the peer connection, so we must suppose it is not in "idle". Start the inactivity listener for peer.
  • If a peer is newly created in the management server and it will be in exclude list (i.e. it is a router) then the manager can not start the connection immediately because the peer.Conn is not exist yet. It is normal and the engine code will create the peer and start the connection in the next step.

Stack

Checklist

  • 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
**Original Pull Request:** https://github.com/netbirdio/netbird/pull/3747 **State:** closed **Merged:** Yes --- ## Describe your changes Fix the exclude list handling. When the agent gets a new network map, it manages the changes in the excluded peers. Cases: - Extend the exclude list with a new peer: start permanent peer connection - Remove a peer from the exclude list: we do not know the actual state of the peer connection, so we must suppose it is not in "**idle**". Start the `inactivity listener` for peer. - If a peer is newly created in the management server and it will be in exclude list (i.e. it is a router) then the manager can not start the connection immediately because the `peer.Conn` is not exist yet. It is normal and the engine code will create the peer and start the connection in the next step. ## Issue ticket number and link ## Stack <!-- branch-stack --> ### 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
saavagebueno added the pull-request label 2025-11-20 08:07:19 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#3907