From 6fcf356b9ab8490350190c532981b256534bd162 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sat, 5 Feb 2022 14:29:33 +0900 Subject: [PATCH] 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. --- src/libsystemd-network/dhcp6-option.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsystemd-network/dhcp6-option.c b/src/libsystemd-network/dhcp6-option.c index 28fe036a40..2ba6bd2aaa 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)