security_group_rule: add support ipv6-icmp

Adds ipv6-icmp protocol to _ports_match check to be able to make that
rules for IPv6.

Story: 2008687
Task: 41989
Change-Id: Ib6313788132bb601d7d53ac709b7c822ee533a8b
This commit is contained in:
Vladimir Ermakov 2021-03-04 13:00:39 +03:00
parent 50deae71f4
commit 16a81fc221
1 changed files with 1 additions and 1 deletions

View File

@ -202,7 +202,7 @@ def _ports_match(protocol, module_min, module_max, rule_min, rule_max):
"""
# Check if the user is supplying -1 for ICMP.
if protocol == 'icmp':
if protocol in ['icmp', 'ipv6-icmp']:
if module_min and int(module_min) == -1:
module_min = None
if module_max and int(module_max) == -1: