diff options
| author | Takashi Sogabe <sogabe@iij.ad.jp> | 2012-10-12 11:24:42 +0900 |
|---|---|---|
| committer | Takashi Sogabe <sogabe@iij.ad.jp> | 2012-10-25 08:23:50 +0900 |
| commit | 8a196b2ec7221ee3e7cd189da18d6630699ddc94 (patch) | |
| tree | 7306d586e0b55d559a01a57dd54d7658940b33a3 /nova | |
| parent | 101a81f053f942904bb475aac3f9fe067468ef0e (diff) | |
| download | nova-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.py | 3 |
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: |
