From 17d38f90d1ce28383a5fc061e01f0853cd8debf6 Mon Sep 17 00:00:00 2001 From: sridhargaddam Date: Fri, 25 Apr 2014 01:21:01 +0530 Subject: [PATCH] Fix protocol value for SG IPV6 RA rule The ingress SG rule for RA has a wrong value for protocol field. Change-Id: I4d3bca4b758540cf857eb13d36ee18f8ebc28272 Closes-Bug: #1312392 --- neutron/db/securitygroups_rpc_base.py | 2 +- neutron/tests/unit/test_security_groups_rpc.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/neutron/db/securitygroups_rpc_base.py b/neutron/db/securitygroups_rpc_base.py index 38d01fb22..b9db8b394 100644 --- a/neutron/db/securitygroups_rpc_base.py +++ b/neutron/db/securitygroups_rpc_base.py @@ -337,7 +337,7 @@ class SecurityGroupServerRpcCallbackMixin(object): ra_rule = {'direction': 'ingress', 'ethertype': q_const.IPv6, - 'protocol': 'icmp', + 'protocol': q_const.PROTO_NAME_ICMP_V6, 'source_ip_prefix': ra_ip, 'source_port_range_min': q_const.ICMPV6_TYPE_RA} port['security_group_rules'].append(ra_rule) diff --git a/neutron/tests/unit/test_security_groups_rpc.py b/neutron/tests/unit/test_security_groups_rpc.py index 17bd3976b..60646c23c 100644 --- a/neutron/tests/unit/test_security_groups_rpc.py +++ b/neutron/tests/unit/test_security_groups_rpc.py @@ -356,7 +356,7 @@ class SGServerRpcCallBackMixinTestCase(test_sg.SecurityGroupDBTestCase): 'port_range_min': 23, 'source_ip_prefix': fake_prefix}, {'direction': 'ingress', - 'protocol': const.PROTO_NAME_ICMP, + 'protocol': const.PROTO_NAME_ICMP_V6, 'ethertype': const.IPv6, 'source_ip_prefix': fake_gateway, 'source_port_range_min': const.ICMPV6_TYPE_RA}, @@ -420,7 +420,7 @@ class SGServerRpcCallBackMixinTestCase(test_sg.SecurityGroupDBTestCase): 'security_group_id': sg1_id, 'port_range_min': 22}, {'direction': 'ingress', - 'protocol': const.PROTO_NAME_ICMP, + 'protocol': const.PROTO_NAME_ICMP_V6, 'ethertype': const.IPv6, 'source_ip_prefix': gateway_lla_ip, 'source_port_range_min': const.ICMPV6_TYPE_RA}, @@ -496,7 +496,7 @@ class SGServerRpcCallBackMixinTestCase(test_sg.SecurityGroupDBTestCase): 'security_group_id': sg1_id, 'port_range_min': 22}, {'direction': 'ingress', - 'protocol': const.PROTO_NAME_ICMP, + 'protocol': const.PROTO_NAME_ICMP_V6, 'ethertype': const.IPv6, 'source_ip_prefix': gateway_lla_ip, 'source_port_range_min': const.ICMPV6_TYPE_RA}, @@ -555,7 +555,7 @@ class SGServerRpcCallBackMixinTestCase(test_sg.SecurityGroupDBTestCase): 'security_group_id': sg1_id, 'port_range_min': 22}, {'direction': 'ingress', - 'protocol': const.PROTO_NAME_ICMP, + 'protocol': const.PROTO_NAME_ICMP_V6, 'ethertype': const.IPv6, 'source_ip_prefix': fake_gateway, 'source_port_range_min': const.ICMPV6_TYPE_RA}, @@ -666,7 +666,7 @@ class SGServerRpcCallBackMixinTestCase(test_sg.SecurityGroupDBTestCase): 'port_range_min': 23, 'dest_ip_prefix': fake_prefix}, {'direction': 'ingress', - 'protocol': const.PROTO_NAME_ICMP, + 'protocol': const.PROTO_NAME_ICMP_V6, 'ethertype': const.IPv6, 'source_ip_prefix': fake_gateway, 'source_port_range_min': const.ICMPV6_TYPE_RA}, @@ -734,7 +734,7 @@ class SGServerRpcCallBackMixinTestCase(test_sg.SecurityGroupDBTestCase): 'remote_group_id': sg2_id, 'security_group_id': sg1_id}, {'direction': 'ingress', - 'protocol': const.PROTO_NAME_ICMP, + 'protocol': const.PROTO_NAME_ICMP_V6, 'ethertype': const.IPv6, 'source_ip_prefix': fake_gateway, 'source_port_range_min': const.ICMPV6_TYPE_RA}, -- 2.45.2