10 Mar
2026
10 Mar
'26
4:11 p.m.
On Mon, 9 Mar 2026 15:52:33 -0400
Jon Maloy
nl_addr_get() was not setting the prefix_len output parameter for IPv6 addresses, only for IPv4. This meant callers always got 0 for IPv6, forcing them to use a hardcoded default (64).
Fix by assigning *prefix_len even in the IPv6 case.
Signed-off-by: Jon Maloy
--- v2: - Simplified according to feedback from S. Brivio - Added test for AF_INET link local property v3: - Corrected claim about convention for IPv4 link local address scope in commit log. v4: - Reverted from the IPv4 link local exclusion change
Applied. -- Stefano