Skip to content

Dhcpcd ipv6 support#102

Open
JedMeister wants to merge 4 commits intoturnkeylinux:masterfrom
JedMeister:dhcpcd-ipv6-support
Open

Dhcpcd ipv6 support#102
JedMeister wants to merge 4 commits intoturnkeylinux:masterfrom
JedMeister:dhcpcd-ipv6-support

Conversation

@JedMeister
Copy link
Copy Markdown
Member

Copy of @marcos-mendez's #101 PR - see that for full details of the IPv6 update.

This PR just amends the last commit to update the gitgnore file and remove build assets (that will now be ignored post the updated gitignore).

PopSolutions added 4 commits March 24, 2026 16:44
- ifutil.py: Add retry loop (10s timeout) in set_dhcp() for non-blocking
  DHCP clients like dhcpcd. The previous code checked for an IP address
  immediately after ifup returned, but dhcpcd forks and assigns the
  address asynchronously (~3s delay).

- ifutil.py: Add get_ipv6conf() to retrieve global-scope IPv6 address
  and prefix length via 'ip -6 addr show'.

- confconsole.py: Display IPv6 address in both the main services screen
  and the networking configuration screen when available.

Tested on Proxmox LXC unprivileged container (Moodle v19, Trixie)
with dhcpcd as the sole DHCP client (dual-stack DHCPv4/DHCPv6).
_get_default_nic() only checked IPv4 via get_ipconf(), causing
confconsole to report 'Networking is not yet configured' on
IPv6-only hosts despite having a valid global address.

Add get_ipv6conf() fallback in _validip(): if no valid IPv4 is
found, check for a global-scope IPv6 address before declaring
the interface unconfigured.

This enables IPv6-first deployments to pass the network check
without requiring an IPv4 address.
Pass IPv6 address as $ip6addr to services.txt template instead of
appending it after substitution. Uses safe_substitute so appliances
without $ip6addr in their services.txt are unaffected.

Ref: turnkeylinux/tracker#1658
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant