Resolves: RHEL-94932
dhcpcd assigns DHCPv6 IA_NA addresses with /128 per RFC 8415.
Some deployments need a shorter prefix (e.g. /64) to match routing
policy, which dhclient supported via --address-prefix-len.
The 99-prefixlen hook provides equivalent behavior. When
DHCPCD_IPV6_PREFIXLEN is set in dhcpcd.conf via the env directive,
the hook deletes the /128 and immediately replaces it with the
requested prefix on BOUND6, RENEW6, REBIND6, and REBOOT6 events.
The del+replace sequence is race-safe: the hook runs synchronously
inside dhcpcd's processing, so the replacement address is already in
the kernel before dhcpcd drains the RTM_DELADDR netlink event. The
if_addrflags6 guard in dhcpcd finds the address still present (by
bytes) and skips the deletion handler, so /128 is never re-added.
ip addr replace (NLM_F_REPLACE|NLM_F_CREATE) handles all lease events
correctly: it adds the address fresh on BOUND6 and updates lifetimes
on RENEW6 without requiring the address to be absent first.
Usage in /etc/dhcpcd.conf:
interface eth0
ia_na 1
env DHCPCD_IPV6_PREFIXLEN=64
The hook is a no-op when DHCPCD_IPV6_PREFIXLEN is not set.