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-14 14:40:57 +09:00
parent 8448321571
commit 6fcf356b9a
+1 -1
View File
@@ -317,7 +317,7 @@ int dhcp6_option_append_ia(uint8_t **buf, size_t *buflen, const DHCP6IA *ia) {
break;
default:
return -EINVAL;
assert_not_reached();
}
if (*buflen < offsetof(DHCP6Option, data) + len)