From de3118452cc9b09b2902f883b1007e80aa7523a1 Mon Sep 17 00:00:00 2001 From: Joe LeVeque Date: Sat, 25 Jan 2020 00:15:26 -0800 Subject: [PATCH] [acl-loader] Use V6 ethertype for IPv6 ACL rule (#788) If ACL table name contains the substring "v6", set the EtherType of the rule to V6, otherwise set to V4. --- acl_loader/main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/acl_loader/main.py b/acl_loader/main.py index 77fd03a35ba3..362f1f75ea5d 100644 --- a/acl_loader/main.py +++ b/acl_loader/main.py @@ -474,8 +474,11 @@ def deny_rule(self, table_name): rule_props = {} rule_data = {(table_name, "DEFAULT_RULE"): rule_props} rule_props["PRIORITY"] = str(self.min_priority) - rule_props["ETHER_TYPE"] = str(self.ethertype_map["ETHERTYPE_IPV4"]) rule_props["PACKET_ACTION"] = "DROP" + if 'v6' in table_name.lower(): + rule_props["ETHER_TYPE"] = str(self.ethertype_map["ETHERTYPE_IPV6"]) + else: + rule_props["ETHER_TYPE"] = str(self.ethertype_map["ETHERTYPE_IPV4"]) return rule_data def convert_rules(self):