Skip to content

Commit

Permalink
[acl-loader] Revert fix for IP protocol == 0 (sonic-net#1142)
Browse files Browse the repository at this point in the history
Signed-off-by: Danny Allen <daall@microsoft.com>
  • Loading branch information
daall authored Oct 5, 2020
1 parent c15cdf6 commit 31eb13b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion acl_loader/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,9 @@ def convert_l2(self, table_name, rule_idx, rule):
def convert_ip(self, table_name, rule_idx, rule):
rule_props = {}

if rule.ip.config.protocol or rule.ip.config.protocol == 0: # 0 is a valid protocol number
# FIXME: 0 is a valid protocol number, but openconfig seems to use it as a default value,
# so there isn't currently a good way to check if the user defined proto=0 or not.
if rule.ip.config.protocol:
if self.ip_protocol_map.has_key(rule.ip.config.protocol):
rule_props["IP_PROTOCOL"] = self.ip_protocol_map[rule.ip.config.protocol]
else:
Expand Down

0 comments on commit 31eb13b

Please sign in to comment.