Skip to content

Commit

Permalink
rollback changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mlsmaycon committed Dec 28, 2024
1 parent 4bde983 commit 289913d
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions management/server/types/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -1320,10 +1320,6 @@ func (a *Account) GetNetworkResourcesRoutesToSync(ctx context.Context, peerID st
}

for _, policy := range resourcePolicies[resource.ID] {
isValid := a.validatePostureChecksOnPeer(ctx, policy.SourcePostureChecks, peerID)
if !isRoutingPeer && !isValid {
continue
}
for _, sourceGroup := range policy.SourceGroups() {
group := a.GetGroup(sourceGroup)
if group == nil {
Expand All @@ -1333,13 +1329,7 @@ func (a *Account) GetNetworkResourcesRoutesToSync(ctx context.Context, peerID st

// routing peer should be able to connect with all source peers
if addSourcePeers {
for _, sPeerId := range group.Peers {
isValid = a.validatePostureChecksOnPeer(ctx, policy.SourcePostureChecks, sPeerId)
if !isValid {
continue
}
allSourcePeers = append(allSourcePeers, sPeerId)
}
allSourcePeers = append(allSourcePeers, group.Peers...)
} else if slices.Contains(group.Peers, peerID) {
// add routes for the resource if the peer is in the distribution group
for peerId, router := range networkRoutingPeers {
Expand Down

0 comments on commit 289913d

Please sign in to comment.