strict check for prefix and prefix length for ipv6 PDs in lease and host constructors
The safest way to make sure Kea internally does not construct a PD lease with invalid prefix and prefix length is to add the check in lease and host constructors.
Currently (after the merge of #2725 (closed)) the possibility to send invalid PD leases to clients comes from the database (either lease or host) which are maintained consistent when using KEA API, but the user can always add entries using database CLI and the data will reach the clients unchecked.
This proposal is robust and simple.
If some flexibility is needed in UTs, a 'test' flag can be set in a static/global variable which can disable these checks.
Edited by Razvan Becheriu