mirror of
https://github.com/netbirdio/netbird.git
synced 2025-02-15 17:59:52 +01:00
Evaluate all applied posture checks on source peers only
Signed-off-by: bcmmbaga <bethuelmbaga12@gmail.com>
This commit is contained in:
parent
076d6d8a87
commit
feb8e90ae1
@ -1319,15 +1319,16 @@ func (a *Account) GetNetworkResourcesRoutesToSync(ctx context.Context, peerID st
|
||||
}
|
||||
}
|
||||
|
||||
var peerPostureChecks []string
|
||||
for _, policy := range resourcePolicies[resource.ID] {
|
||||
peerPostureChecks = append(peerPostureChecks, policy.SourcePostureChecks...)
|
||||
}
|
||||
if !addSourcePeers {
|
||||
var peerPostureChecks []string
|
||||
for _, policy := range resourcePolicies[resource.ID] {
|
||||
peerPostureChecks = append(peerPostureChecks, policy.SourcePostureChecks...)
|
||||
}
|
||||
|
||||
// validate the peer based on policy posture checks applied
|
||||
isValid := a.validatePostureChecksOnPeer(ctx, peerPostureChecks, peerID)
|
||||
if !isValid {
|
||||
continue
|
||||
isValid := a.validatePostureChecksOnPeer(ctx, peerPostureChecks, peerID)
|
||||
if !isValid {
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
for _, policy := range resourcePolicies[resource.ID] {
|
||||
|
Loading…
Reference in New Issue
Block a user