1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-30 06:25:37 +03:00

sd-dhcp6-client: logs invalid NTP option

Returning negative errno triggers to produce debugging log in
dhcp6_lease_parse_message().
This commit is contained in:
Yu Watanabe 2022-02-10 21:11:32 +09:00
parent 3f09d563f4
commit e261d31557

View File

@ -345,7 +345,7 @@ int dhcp6_lease_add_ntp(sd_dhcp6_lease *lease, const uint8_t *optval, size_t opt
case DHCP6_NTP_SUBOPTION_SRV_ADDR:
case DHCP6_NTP_SUBOPTION_MC_ADDR:
if (sublen != 16)
return 0;
return -EINVAL;
r = dhcp6_option_parse_addresses(subval, sublen, &lease->ntp, &lease->ntp_count);
if (r < 0)