NSX|V: do not build NAT rules for v6 networks
NSX does not support IPv6 NAT rules Change-Id: I50d3ebc6c27cc0afeb7d148c941ad5fa1b365e49
This commit is contained in:
parent
5a8b1c0131
commit
57010acc3a
@ -180,7 +180,8 @@ class NsxPluginBase(db_base_plugin_v2.NeutronDbPluginV2,
|
|||||||
subnet_qry = context.session.query(models_v2.Subnet)
|
subnet_qry = context.session.query(models_v2.Subnet)
|
||||||
subnet = subnet_qry.filter_by(id=ip.subnet_id).one()
|
subnet = subnet_qry.filter_by(id=ip.subnet_id).one()
|
||||||
subnets.append({'id': subnet.id, 'cidr': subnet.cidr,
|
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
|
return subnets
|
||||||
|
|
||||||
def _find_router_gw_subnets(self, context, router):
|
def _find_router_gw_subnets(self, context, router):
|
||||||
|
@ -3322,7 +3322,9 @@ class NsxVPluginV2(addr_pair_db.AllowedAddressPairsMixin,
|
|||||||
subnets = self._find_router_subnets(context.elevated(),
|
subnets = self._find_router_subnets(context.elevated(),
|
||||||
router['id'])
|
router['id'])
|
||||||
for subnet in subnets:
|
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:
|
# if the subnets address scope is the same as the gateways:
|
||||||
# no need for SNAT
|
# no need for SNAT
|
||||||
gw_address_scope = self._get_network_address_scope(
|
gw_address_scope = self._get_network_address_scope(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user