Skip to content

fix(ns-ipsec): synchronize disabled state for existing routes in edit tunnel API#1567

Open
m-dilorenzi wants to merge 2 commits intomainfrom
IPSec_route_not_reactivated
Open

fix(ns-ipsec): synchronize disabled state for existing routes in edit tunnel API#1567
m-dilorenzi wants to merge 2 commits intomainfrom
IPSec_route_not_reactivated

Conversation

@m-dilorenzi
Copy link
Collaborator

This pull request makes improvements to the management of route state when editing an IPsec tunnel in the ns.ipsectunnel module. The main focus is on ensuring that the enabled/disabled status of the tunnel is consistently applied to all associated routes.

Route state synchronization:

  • Introduced the route_disabled variable to centralize the logic for determining route disabled state based on the tunnel's enabled argument.
  • Updated route creation logic to use the new route_disabled variable for setting the disabled state, ensuring consistency.
  • Added a loop to synchronize the disabled state across all existing routes linked to the tunnel, using uci_set_if_changed to update only when necessary.

Closes: #1558

@m-dilorenzi m-dilorenzi requested a review from Tbaile March 13, 2026 11:48
@m-dilorenzi m-dilorenzi self-assigned this Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IPSec: route not reactivated when enabled from drawer

1 participant