mirror of
https://github.com/floci-io/floci.git
synced 2026-12-01 01:12:48 -05:00
A network interface held no IPv6 address: CreateNetworkInterface ignored Ipv6Addresses and Ipv6AddressCount, AssignIpv6Addresses and UnassignIpv6Addresses were not implemented, and nothing reported an ipv6AddressesSet, so a dual-stack subnet's interfaces looked IPv4-only. CreateNetworkInterface now takes the named addresses or a count drawn from the subnet's associated IPv6 block, with a random host part. Left out, the subnet's AssignIpv6AddressOnCreation gives one address; an explicit 0 overrides it, as the API reference says. AssignIpv6Addresses reads Ipv6Addresses.N (the name the SDKs send) or Ipv6AddressCount, needs one of them, and reports only the addresses it added; UnassignIpv6Addresses reports only the ones the interface held. Both work on standalone interfaces and on an instance's launch-created one. An address outside the subnet's blocks answers InvalidParameterValue and one another interface holds InvalidIPAddress.InUse; prefix delegation answers UnsupportedOperation, a list with any count InvalidParameterCombination, and a reserved address (a block's four first and its last) InvalidParameterValue. An interface holds at most as many IPv6 addresses as private IPv4 ones, and a block without enough free hosts answers InsufficientFreeAddressesInSubnet. DescribeNetworkInterfaces and DescribeInstances report ipv6AddressesSet, and a supplied interface keeps its addresses on the instance it launches. Termination now releases interfaces under the topology lock, and an IPv6 change writes back only what is still stored. Part of #2564.