]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Removed spurious check for ip version
authorIhar Hrachyshka <ihrachys@redhat.com>
Tue, 16 Dec 2014 15:23:40 +0000 (16:23 +0100)
committerIhar Hrachyshka <ihrachys@redhat.com>
Mon, 5 Jan 2015 11:21:45 +0000 (12:21 +0100)
We may assume that _add_ingress_ra_rule() receives only RA (=IPv6)
ports, so no need to check IP version one more time.

The corresponding IP version filter is already applied in
_select_ra_ips_for_network_ids().

Change-Id: Ibde56a2eb32eed468defdd02a44cc3360ce82e53

neutron/db/securitygroups_rpc_base.py

index eb241fc36dcefcc2e50bbfdedfef65efb61c0985..c1f7b3d8b641e2c6a76760c79f8bf8f5cbf42d0e 100644 (file)
@@ -411,9 +411,6 @@ class SecurityGroupServerRpcMixin(sg_db.SecurityGroupDbMixin):
     def _add_ingress_ra_rule(self, port, ips):
         ra_ips = ips.get(port['network_id'])
         for ra_ip in ra_ips:
-            if not netaddr.IPAddress(ra_ip).version == 6:
-                return
-
             ra_rule = {'direction': 'ingress',
                        'ethertype': q_const.IPv6,
                        'protocol': q_const.PROTO_NAME_ICMP_V6,