1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-12 13:18:14 +03:00

sd-dhcp6-client: trigger assertion whn invalid IA type is provided

If the condition hits, then it is an error in coding, instead of a user
misconfiguration or invalid receivd message.
This commit is contained in:
Yu Watanabe 2022-02-05 14:29:33 +09:00
parent 8448321571
commit 6fcf356b9a

View File

@ -317,7 +317,7 @@ int dhcp6_option_append_ia(uint8_t **buf, size_t *buflen, const DHCP6IA *ia) {
break; break;
default: default:
return -EINVAL; assert_not_reached();
} }
if (*buflen < offsetof(DHCP6Option, data) + len) if (*buflen < offsetof(DHCP6Option, data) + len)