chiark / gitweb /
sd-dhcp6-client: Make end of successfull option parsing explicit
[elogind.git] / src / libsystemd-network / sd-dhcp6-client.c
index 8537d7cc86434f004f90ea365a343dc3882c6fe7..cc5b74416ffdb6dcffe02be90f0e63da783318d5 100644 (file)
@@ -770,7 +770,10 @@ static int client_parse_message(sd_dhcp6_client *client,
                 }
         }
 
-        if ((r < 0 && r != -ENOMSG) || !clientid) {
+        if (r == -ENOMSG)
+                r = 0;
+
+        if (r < 0 || !clientid) {
                 log_dhcp6_client(client, "%s has incomplete options",
                                  dhcp6_message_type_to_string(message->type));
                 return -EINVAL;