mirror of
https://github.com/gravitl/netmaker.git
synced 2025-11-09 16:21:01 +08:00
fix ext-ext comms
This commit is contained in:
parent
9a1c1c281b
commit
6e1b16a6ea
1 changed files with 6 additions and 2 deletions
|
|
@ -685,10 +685,14 @@ func GetFwRulesOnIngressGateway(node models.Node) (rules []models.FwRule) {
|
|||
if peer.StaticNode.ClientID == nodeI.StaticNode.ClientID || peer.IsUserNode {
|
||||
continue
|
||||
}
|
||||
if nodeI.StaticNode.IngressGatewayID != node.ID.String() && peer.ID.String() != node.ID.String() {
|
||||
if nodeI.StaticNode.IngressGatewayID != node.ID.String() &&
|
||||
((!peer.IsStatic && peer.ID.String() != node.ID.String()) ||
|
||||
(peer.IsStatic && peer.StaticNode.IngressGatewayID != node.ID.String())) {
|
||||
continue
|
||||
}
|
||||
|
||||
if peer.IsStatic {
|
||||
peer = peer.StaticNode.ConvertToStaticNode()
|
||||
}
|
||||
if ok, allowedPolicies := IsNodeAllowedToCommunicateV1(nodeI.StaticNode.ConvertToStaticNode(), peer, true); ok {
|
||||
rules = append(rules, getFwRulesForNodeAndPeerOnGw(nodeI.StaticNode.ConvertToStaticNode(), peer, allowedPolicies)...)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue