浏览代码

fix all resources check for egress

abhishek9686 3 月之前
父节点
当前提交
370426c7d1
共有 1 个文件被更改,包括 1 次插入5 次删除
  1. 1 5
      logic/egress.go

+ 1 - 5
logic/egress.go

@@ -39,16 +39,12 @@ func ValidateEgressReq(e *schema.Egress) error {
 func DoesNodeHaveAccessToEgress(node *models.Node, e *schema.Egress, acls []models.Acl) bool {
 	nodeTags := maps.Clone(node.Tags)
 	nodeTags[models.TagID(node.ID.String())] = struct{}{}
+	nodeTags[models.TagID("*")] = struct{}{}
 	for _, acl := range acls {
 		if !acl.Enabled {
 			continue
 		}
 		srcVal := ConvAclTagToValueMap(acl.Src)
-		if acl.AllowedDirection == models.TrafficDirectionBi {
-			if _, ok := srcVal["*"]; ok {
-				return true
-			}
-		}
 		for _, dstI := range acl.Dst {
 
 			if dstI.ID == models.NodeTagID && dstI.Value == "*" {