From 8a196b2ec7221ee3e7cd189da18d6630699ddc94 Mon Sep 17 00:00:00 2001 From: Takashi Sogabe Date: Fri, 12 Oct 2012 11:24:42 +0900 Subject: 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 --- nova/network/manager.py | 3 +++ 1 file changed, 3 insertions(+) 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: -- cgit