networkd-dhcp6: Log warning with PD prefixes shorter than 48

Log a warning message in case the network prefix delegated is shorter
than /48.
This commit is contained in:
Patrik Flykt 2018-08-24 09:49:14 -06:00
parent 56663345df
commit 3ec8303fdc
1 changed files with 5 additions and 0 deletions

View File

@ -236,6 +236,11 @@ static int dhcp6_lease_pd_prefix_acquired(sd_dhcp6_client *client, Link *link) {
continue;
}
if (pd_prefix_len < 48) {
log_link_warning(link, "PD Prefix length < 48, looks unusual %s/%u",
strnull(buf), pd_prefix_len);
}
r = dhcp6_pd_prefix_distribute(link, &i, &pd_prefix,
pd_prefix_len,
lifetime_preferred,