mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-09 22:55:02 +08:00
support static nodes in standalone device policies
This commit is contained in:
parent
9a40717b5b
commit
46d79ee512
1 changed files with 12 additions and 6 deletions
|
@ -280,9 +280,12 @@ func IsAclPolicyValid(acl models.Acl) bool {
|
|||
return false
|
||||
}
|
||||
} else {
|
||||
_, err := GetNodeByID(dstI.Value)
|
||||
if err != nil {
|
||||
return false
|
||||
_, nodeErr := GetNodeByID(dstI.Value)
|
||||
if nodeErr != nil {
|
||||
_, staticNodeErr := GetExtClient(dstI.Value, acl.NetworkID.String())
|
||||
if staticNodeErr != nil {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -329,9 +332,12 @@ func IsAclPolicyValid(acl models.Acl) bool {
|
|||
return false
|
||||
}
|
||||
} else {
|
||||
_, err := GetNodeByID(dstI.Value)
|
||||
if err != nil {
|
||||
return false
|
||||
_, nodeErr := GetNodeByID(dstI.Value)
|
||||
if nodeErr != nil {
|
||||
_, staticNodeErr := GetExtClient(dstI.Value, acl.NetworkID.String())
|
||||
if staticNodeErr != nil {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue