]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-dhcp6-client: trigger assertion whn invalid IA type is provided
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 5 Feb 2022 05:29:33 +0000 (14:29 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 14 Feb 2022 05:40:57 +0000 (14:40 +0900)
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

index 28fe036a4095efa197101a16d189a18873e2f0c7..2ba6bd2aaa8302ebdac9e064e8ed28b80bdd41b8 100644 (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)