File tree 1 file changed +7
-6
lines changed
files/image_config/caclmgrd
1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -194,13 +194,14 @@ class ControlPlaneAclManager(object):
194
194
continue
195
195
196
196
# If we haven't determined the IP version for this ACL table yet,
197
- # try to do it now. We determine heuristically based on whether the
198
- # src IP is an IPv4 or IPv6 address.
199
- if not table_ip_version and "SRC_IP" in rule_props and rule_props [ "SRC_IP" ] :
200
- ip_addr = ipaddress . IPAddress ( rule_props [ "SRC_IP" ]. split ( "/" )[ 0 ])
201
- if isinstance ( ip_addr , ipaddress . IPv6Address ):
197
+ # try to do it now. We attempt to determine heuristically based on
198
+ # whether the src or dst IP of this rule is an IPv4 or IPv6 address.
199
+ if not table_ip_version :
200
+ if (( "SRC_IPV6" in rule_props and rule_props [ "SRC_IPV6" ]) or
201
+ ( "DST_IPV6" in rule_props and rule_props [ "DST_IPV6" ]) ):
202
202
table_ip_version = 6
203
- elif isinstance (ip_addr , ipaddress .IPv4Address ):
203
+ elif (("SRC_IP" in rule_props and rule_props ["SRC_IP" ]) or
204
+ ("DST_IP" in rule_props and rule_props ["DST_IP" ])):
204
205
table_ip_version = 4
205
206
206
207
# If we were unable to determine whether this ACL table contains
You can’t perform that action at this time.
0 commit comments