Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion orchagent/vnetorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3518,6 +3518,12 @@ void VNetTunnelTermAcl::lazyInit()
};
string matches = std::accumulate(std::next(match_list.begin()), match_list.end(), match_list[0], concat);

vector<string> action_list = {
ACTION_REDIRECT_ACTION,
ACTION_COUNTER
};
string actions = std::accumulate(std::next(action_list.begin()), action_list.end(), action_list[0], concat);

vector<string> bpoint_list = {
BIND_POINT_TYPE_PORT,
BIND_POINT_TYPE_PORTCHANNEL
Expand All @@ -3526,7 +3532,7 @@ void VNetTunnelTermAcl::lazyInit()

vector<FieldValueTuple> fvs = {
{ACL_TABLE_TYPE_MATCHES, matches},
{ACL_TABLE_TYPE_ACTIONS, ACTION_REDIRECT_ACTION},
{ACL_TABLE_TYPE_ACTIONS, actions},
{ACL_TABLE_TYPE_BPOINT_TYPES, bpoints}
};

Expand Down
8 changes: 8 additions & 0 deletions tests/test_vnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -2687,6 +2687,14 @@ def test_vnet_orch_28(self, dvs, dvs_acl, testlog):
vnet_obj.fetch_exist_entries(dvs)
create_vnet_routes(dvs, "100.100.1.1/32", vnet_name, '9.1.0.1,9.1.0.2', ep_monitor='9.1.0.3,9.1.0.4', primary ='9.1.0.1', profile="Test_profile", monitoring='custom', adv_prefix='100.100.1.0/24', check_directly_connected=True)

# verify acl table action list
expected_action_list = [
"SAI_ACL_ACTION_TYPE_COUNTER",
"SAI_ACL_ACTION_TYPE_REDIRECT"
]
acl_table_id = dvs_acl.get_acl_table_ids(1)[0]
dvs_acl.verify_acl_table_action_list(acl_table_id, expected_action_list)

# verify tunnel term acl
expected_sai_qualifiers = {
"SAI_ACL_ENTRY_ATTR_FIELD_DST_IP": dvs_acl.get_simple_qualifier_comparator("100.100.1.1&mask:255.255.255.255")
Expand Down
Loading