Skip to content

Commit

Permalink
Extend IPv6 subnets to /64 if network_size is set smaller than /64
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Takashi Sogabe committed Oct 24, 2012
1 parent 101a81f commit 8a196b2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nova/network/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1508,6 +1508,9 @@ def _do_create_networks(self, context,
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:
Expand Down

0 comments on commit 8a196b2

Please sign in to comment.