diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-01-13 20:13:03 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2022-01-13 20:20:19 +0900 |
commit | 0ac9daa4a169f627f5b3f85a4cdcdbd2c2b2e2ca (patch) | |
tree | 7946d9007983e75bcb75eaa446452069a356b5a5 | |
parent | 2811b1263b52af54ae93439f027af963773273ff (diff) | |
download | systemd-0ac9daa4a169f627f5b3f85a4cdcdbd2c2b2e2ca.tar.gz |
sd-dhcp6-client: ignore broken non-critical options
The commit b89a3758e92894162e3c2dcb594a55acff3274d5 made the validity
check of the received message stricter. E.g. if the client received a
message with broken NTP server option, then the entire message is
dropped.
This relaxes the check. If some non-critical options are broken, then
ignore the options, but the message itself is still accepted.
Fixes #22099.
-rw-r--r-- | src/libsystemd-network/sd-dhcp6-client.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libsystemd-network/sd-dhcp6-client.c b/src/libsystemd-network/sd-dhcp6-client.c index d3c667974d..8150227d7e 100644 --- a/src/libsystemd-network/sd-dhcp6-client.c +++ b/src/libsystemd-network/sd-dhcp6-client.c @@ -1261,35 +1261,35 @@ static int client_parse_message( case SD_DHCP6_OPTION_DNS_SERVERS: r = dhcp6_lease_add_dns(lease, optval, optlen); if (r < 0) - return r; + log_dhcp6_client_errno(client, r, "Failed to parse DNS server option, ignoring: %m"); break; case SD_DHCP6_OPTION_DOMAIN_LIST: r = dhcp6_lease_add_domains(lease, optval, optlen); if (r < 0) - return r; + log_dhcp6_client_errno(client, r, "Failed to parse domain list option, ignoring: %m"); break; case SD_DHCP6_OPTION_NTP_SERVER: r = dhcp6_lease_add_ntp(lease, optval, optlen); if (r < 0) - return r; + log_dhcp6_client_errno(client, r, "Failed to parse NTP server option, ignoring: %m"); break; case SD_DHCP6_OPTION_SNTP_SERVERS: r = dhcp6_lease_add_sntp(lease, optval, optlen); if (r < 0) - return r; + log_dhcp6_client_errno(client, r, "Failed to parse SNTP server option, ignoring: %m"); break; case SD_DHCP6_OPTION_CLIENT_FQDN: r = dhcp6_lease_set_fqdn(lease, optval, optlen); if (r < 0) - return r; + log_dhcp6_client_errno(client, r, "Failed to parse FQDN option, ignoring: %m"); break; |