From: Yu Watanabe Date: Sat, 5 Feb 2022 05:29:33 +0000 (+0900) Subject: sd-dhcp6-client: trigger assertion whn invalid IA type is provided X-Git-Tag: v251-rc1~291^2~64 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6fcf356b9ab8490350190c532981b256534bd162;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/libsystemd-network/dhcp6-option.c b/src/libsystemd-network/dhcp6-option.c index 28fe036a409..2ba6bd2aaa8 100644 --- a/src/libsystemd-network/dhcp6-option.c +++ b/src/libsystemd-network/dhcp6-option.c @@ -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)