diff --git a/vmware_nsx/plugins/common/plugin.py b/vmware_nsx/plugins/common/plugin.py index a24c6e720e..f26147b58a 100644 --- a/vmware_nsx/plugins/common/plugin.py +++ b/vmware_nsx/plugins/common/plugin.py @@ -180,7 +180,8 @@ class NsxPluginBase(db_base_plugin_v2.NeutronDbPluginV2, subnet_qry = context.session.query(models_v2.Subnet) subnet = subnet_qry.filter_by(id=ip.subnet_id).one() subnets.append({'id': subnet.id, 'cidr': subnet.cidr, - 'subnetpool_id': subnet.subnetpool_id}) + 'subnetpool_id': subnet.subnetpool_id, + 'ip_version': subnet.ip_version}) return subnets def _find_router_gw_subnets(self, context, router): diff --git a/vmware_nsx/plugins/nsx_v/plugin.py b/vmware_nsx/plugins/nsx_v/plugin.py index 6b6192df7c..e4dfb3119a 100644 --- a/vmware_nsx/plugins/nsx_v/plugin.py +++ b/vmware_nsx/plugins/nsx_v/plugin.py @@ -3322,7 +3322,9 @@ class NsxVPluginV2(addr_pair_db.AllowedAddressPairsMixin, subnets = self._find_router_subnets(context.elevated(), router['id']) for subnet in subnets: - + # Do not build NAT rules for v6 + if subnet.get('ip_version') == 6: + continue # if the subnets address scope is the same as the gateways: # no need for SNAT gw_address_scope = self._get_network_address_scope(