Description
When using dhcpcd in initramfs environments (via initramfs-tools), DHCPv6 related information is exposed to hook scripts through environment variables such as:
new_dhcp6_ia_na1_ia_addr1
new_dhcp6_name_servers
new_dhcp6_domain_search
However, there is no corresponding variable exposing IPv6 prefix length information (e.g. /64) in the hook environment.
As a result, downstream initramfs scripts (notably initramfs-tools dhcpcd hooks) are forced to hardcode a default IPv6 prefix length:
This may be a contributing factor to prefix length conflict issues such as:
May 26 15:25:47 kajgm-3-00435091 systemd-networkd[5020]: ens300np0: Ignoring DHCPv6 address
xxxx:xxxx:xxxx:xxxx:x:xxxx:xxxx:xxxx/128 (valid for 1d 59min 59s, preferred for 23h 59min 59s)
which conflicts with xxxx:xxxx:xxxx:xxxx:x:xxxx:xxxx:xxxx/64.
Expected Behavior
dhcpcd should expose IPv6 prefix length information in the hook environment when applicable, so that downstream consumers can use consistent and correct network configuration.
For example, a variable such as new_dhcp6_prefixlen or similar would allow initramfs hooks to correctly populate IPv6 configuration without relying on hardcoded defaults.
Actual Behavior
No IPv6 prefix length is provided from dhcpcd in the dhcpcd initramfs hook environment.
Additional Links/Related Bugs
Description
When using dhcpcd in initramfs environments (via initramfs-tools), DHCPv6 related information is exposed to hook scripts through environment variables such as:
However, there is no corresponding variable exposing IPv6 prefix length information (e.g. /64) in the hook environment.
As a result, downstream initramfs scripts (notably initramfs-tools dhcpcd hooks) are forced to hardcode a default IPv6 prefix length:
This may be a contributing factor to prefix length conflict issues such as:
Expected Behavior
dhcpcd should expose IPv6 prefix length information in the hook environment when applicable, so that downstream consumers can use consistent and correct network configuration.
For example, a variable such as
new_dhcp6_prefixlenor similar would allow initramfs hooks to correctly populate IPv6 configuration without relying on hardcoded defaults.Actual Behavior
No IPv6 prefix length is provided from dhcpcd in the dhcpcd initramfs hook environment.
Additional Links/Related Bugs