mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-11 23:54:22 +08:00
fix uni direction acl rule for static nodes
This commit is contained in:
parent
818a2e806e
commit
f5f89309e9
1 changed files with 7 additions and 1 deletions
|
@ -987,6 +987,12 @@ func MigrateAclPolicies() {
|
|||
acl.Port = []string{}
|
||||
UpsertAcl(acl)
|
||||
}
|
||||
if !servercfg.IsPro {
|
||||
if acl.AllowedDirection == models.TrafficDirectionUni {
|
||||
acl.AllowedDirection = models.TrafficDirectionBi
|
||||
UpsertAcl(acl)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1032,7 +1038,7 @@ func IsNodeAllowedToCommunicateWithAllRsrcs(node models.Node) bool {
|
|||
dstMap = nil
|
||||
}()
|
||||
for _, policy := range policies {
|
||||
if !policy.Enabled {
|
||||
if !policy.Enabled || policy.AllowedDirection == models.TrafficDirectionUni {
|
||||
continue
|
||||
}
|
||||
srcMap = ConvAclTagToValueMap(policy.Src)
|
||||
|
|
Loading…
Add table
Reference in a new issue