From: Yu Watanabe Date: Thu, 10 Feb 2022 12:11:32 +0000 (+0900) Subject: sd-dhcp6-client: logs invalid NTP option X-Git-Tag: v251-rc1~291^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e261d31557828488a7020e1d0bde607b4e61c483;p=thirdparty%2Fsystemd.git sd-dhcp6-client: logs invalid NTP option Returning negative errno triggers to produce debugging log in dhcp6_lease_parse_message(). --- diff --git a/src/libsystemd-network/sd-dhcp6-lease.c b/src/libsystemd-network/sd-dhcp6-lease.c index 90adad16a6a..941de2f68cc 100644 --- a/src/libsystemd-network/sd-dhcp6-lease.c +++ b/src/libsystemd-network/sd-dhcp6-lease.c @@ -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)