Skip to content

fix(netplan): handle ipv6_slaac separately from dhcp6#6850

Open
armorbreak001 wants to merge 1 commit intocanonical:mainfrom
armorbreak001:fix/netplan-ipv6-slaac
Open

fix(netplan): handle ipv6_slaac separately from dhcp6#6850
armorbreak001 wants to merge 1 commit intocanonical:mainfrom
armorbreak001:fix/netplan-ipv6-slaac

Conversation

@armorbreak001
Copy link
Copy Markdown

The netplan renderer treats ipv6_slaac subnet type identically to dhcp6, generating dhcp6: true in the netplan config. This causes VMs to acquire DHCPv6 addresses in addition to SLAAC addresses, which is not the expected behavior for SLAAC.

Root cause: all IPV6_DYNAMIC_TYPES (which includes ipv6_slaac, dhcp6, ipv6_dhcpv6-stateless, and ipv6_dhcpv6-stateful) share a single code path that unconditionally sets dhcp6: True.

The other renderers (eni, sysconfig, NetworkManager) each handle ipv6_slaac as a distinct case:

  • eni: sets iface inet6 auto with dhcp 0
  • sysconfig: has a dedicated elif branch for ipv6_slaac
  • NetworkManager: maps ipv6_slaac to method auto (distinct from DHCPv6)

This change makes the netplan renderer consistent: for ipv6_slaac subnets it now emits accept-ra: true instead of dhcp6: true. The netplan renderer already has plumbing for accept-ra at line 201 of netplan.py.

Fixes #6847

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

Hello! Thank you for this proposed change to cloud-init. This pull request is now marked as stale as it has not seen any activity in 14 days. If no activity occurs within the next 7 days, this pull request will automatically close.

If you are waiting for code review and you are seeing this message, apologies! Please reply, tagging blackboxsw, and he will ensure that someone takes a look soon.

(If the pull request is closed and you would like to continue working on it, please do tag blackboxsw to reopen it.)

@github-actions github-actions Bot added the stale-pr Pull request is stale; will be auto-closed soon label May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale-pr Pull request is stale; will be auto-closed soon

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Netplan renderer incorrectly mixes DHCPv6 and SLAAC

1 participant