Skip to content

Commit fcbb524

Browse files
committed
check if node is egress gw
1 parent 087b739 commit fcbb524

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

logic/peers.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,8 @@ func GetPeerUpdateForHost(network string, host *models.Host, allNodes []models.N
207207
defaultUserPolicy, _ := GetDefaultPolicy(models.NetworkID(node.Network), models.UserPolicy)
208208
defaultDevicePolicy, _ := GetDefaultPolicy(models.NetworkID(node.Network), models.DevicePolicy)
209209
if (defaultDevicePolicy.Enabled && defaultUserPolicy.Enabled) ||
210-
(!CheckIfAnyPolicyisUniDirectional(node, acls) && !CheckIfAnyActiveEgressPolicy(node, acls)) {
210+
(!CheckIfAnyPolicyisUniDirectional(node, acls) &&
211+
!(node.EgressDetails.IsEgressGateway && len(node.EgressDetails.EgressGatewayRanges) > 0)) {
211212
aclRule := models.AclRule{
212213
ID: fmt.Sprintf("%s-allowed-network-rules", node.ID.String()),
213214
AllowedProtocol: models.ALL,

0 commit comments

Comments
 (0)