summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
authorTakashi Sogabe <sogabe@iij.ad.jp>2012-10-12 11:24:42 +0900
committerTakashi Sogabe <sogabe@iij.ad.jp>2012-10-25 08:23:50 +0900
commit8a196b2ec7221ee3e7cd189da18d6630699ddc94 (patch)
tree7306d586e0b55d559a01a57dd54d7658940b33a3 /nova
parent101a81f053f942904bb475aac3f9fe067468ef0e (diff)
downloadnova-8a196b2ec7221ee3e7cd189da18d6630699ddc94.tar.gz
nova-8a196b2ec7221ee3e7cd189da18d6630699ddc94.tar.xz
nova-8a196b2ec7221ee3e7cd189da18d6630699ddc94.zip
Extend IPv6 subnets to /64 if network_size is set smaller than /64
If cidr_v6 is set with network_size smaller than /64, this fix extends the subnet to /64. Fixes bug #1011122. Radvd (which is used by nova-network) also requires as /64 for autoconf at the client(instance) side. Change-Id: I0a6ac363e46dd9b8c9cfb750ce37720fdbc56a1f
Diffstat (limited to 'nova')
-rw-r--r--nova/network/manager.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/nova/network/manager.py b/nova/network/manager.py
index 06380a97f..385cc200c 100644
--- a/nova/network/manager.py
+++ b/nova/network/manager.py
@@ -1508,6 +1508,9 @@ class NetworkManager(manager.SchedulerDependentManager):
if cidr_v6:
fixed_net_v6 = netaddr.IPNetwork(cidr_v6)
prefixlen_v6 = 128 - subnet_bits
+ # smallest subnet in IPv6 ethernet network is /64
+ if prefixlen_v6 > 64:
+ prefixlen_v6 = 64
subnets_v6 = fixed_net_v6.subnet(prefixlen_v6,
count=num_networks)
if cidr: