Skip to content

Commit b06357a

Browse files
[dash]: Don't attempt to bind empty ACL groups (sonic-net#2613)
* [dash]: Don't attempt to bind empty ACL groups Signed-off-by: Lawrence Lee <[email protected]>
1 parent 4ab059a commit b06357a

File tree

2 files changed

+213
-112
lines changed

2 files changed

+213
-112
lines changed

orchagent/dash/dashaclorch.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,13 @@ task_process_status DashAclOrch::bindAclToEni(DashAclTable &acl_table, const str
761761
return task_need_retry;
762762
}
763763

764+
if (acl_group->m_rule_count <= 0)
765+
{
766+
SWSS_LOG_INFO("acl group %s contains 0 rules, waiting for rule creation", acl.m_acl_group_id->c_str());
767+
acl.m_acl_group_id.reset();
768+
return task_need_retry;
769+
}
770+
764771
attr.id = getSaiStage(direction, *(acl_group->m_ip_version), stage);
765772
attr.value.oid = acl_group->m_dash_acl_group_id;
766773
}

0 commit comments

Comments
 (0)