odhcpd: add support for dhcpv6_pd_min_len parameter
The dhcpv6_pd_min_len configuration clamps the requested prefix
delegation to be at least as big as the option. This allows a
router to manage the size of each downstream router's prefix
delegation length independently from the delegating interface's
prefix length.
This behavior is an implementation choice permitted by the RFCs.
The delegating router (us) is not required to honor the hint
(RFC3633, section 11.2, we MAY choose to use the information in the
option; RFC8168, section 3.2 has several SHOULDs about desired
choices for selecting a prefix to delegate).
This configuration allows us to conserve prefix space so that any
single router can't grab too much of it. Consider if we have an
interface with a /56 prefix. A requesting router could ask for a
/58 and take 1/4 of our total address space. But if we set a
minimum of /60, we can limit each requesting router to get only 1/16
of our total address space.
sample config:
config dhcp 'pd'
...
option dhcpv6_pd_min_len '60'
Signed-off-by: John Kohl <jtk.git@bostonpog.org>
[ use different comment style and fix commit description ]
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>