Bug 253005 - Received IPv6 RA message with plen !=64 in PIO is not processed.
Summary: Received IPv6 RA message with plen !=64 in PIO is not processed.
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 12.1-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
Depends on:
Reported: 2021-01-25 21:30 UTC by dmytro
Modified: 2021-03-01 15:24 UTC (History)
1 user (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description dmytro 2021-01-25 21:30:52 UTC
Received IPv6 prefix via Prefix Information Option in RA message is not processed (Even when presented code seems to have this ability).
There is function "in6_ifadd()" referenced in the: source/netinet6/nd6_rtr.c Line: 1624
This function seems to allow configuration of the prefix and IID with length !=64.
The code responsible for setting prefix and IID with length !=64 is presented inline and below: source/netinet6/nd6_rtr.c Lines: 2233-2244

Actual Results:
When FreeBSD receives an RA message with prefix len == 80, no ipv6 address with plen = 80 is autoconfigured on the interfaces.

Expected Results: 
Ipv6 address with plen == 80 autoconfigured on the interfaces.

 2232         /* make ifaddr */
 2233         in6_prepare_ifra(&ifra, &pr->ndpr_prefix.sin6_addr, &mask);
 2235         IN6_MASK_ADDR(&ifra.ifra_addr.sin6_addr, &mask);
 2236         /* interface ID */
 2237         ifra.ifra_addr.sin6_addr.s6_addr32[0] |=
 2238             (ib->ia_addr.sin6_addr.s6_addr32[0] & ~mask.s6_addr32[0]);
 2239         ifra.ifra_addr.sin6_addr.s6_addr32[1] |=
 2240             (ib->ia_addr.sin6_addr.s6_addr32[1] & ~mask.s6_addr32[1]);
 2241         ifra.ifra_addr.sin6_addr.s6_addr32[2] |=
 2242             (ib->ia_addr.sin6_addr.s6_addr32[2] & ~mask.s6_addr32[2]);
 2243         ifra.ifra_addr.sin6_addr.s6_addr32[3] |=
 2244             (ib->ia_addr.sin6_addr.s6_addr32[3] & ~mask.s6_addr32[3]);