mirror of
https://github.com/juanfont/headscale.git
synced 2025-08-12 11:07:35 +00:00
* fix #1706 - failover should disregard disabled routes during failover * fixe tests for failover; all current tests assume routes to be enabled * add testcase for #1706 - failover to disabled route
This commit is contained in:
@@ -585,6 +585,10 @@ func (hsdb *HSDatabase) failoverRoute(r *types.Route) ([]key.MachinePublic, erro
|
||||
continue
|
||||
}
|
||||
|
||||
if !route.Enabled {
|
||||
continue
|
||||
}
|
||||
|
||||
if hsdb.notifier.IsConnected(route.Node.MachineKey) {
|
||||
newPrimary = &routes[idx]
|
||||
break
|
||||
|
Reference in New Issue
Block a user