mirror of
https://github.com/systemd/systemd.git
synced 2024-11-01 17:51:22 +03:00
sd-dhcp6-client: Make end of successfull option parsing explicit
When all DHCPv6 options have been parsed, dhcp6_option_parse() returns -ENOMSG. Explicitely set the return value to indicate success so that later code does not need to take this special value into account.
This commit is contained in:
parent
8c67d0a74b
commit
c47e8936a4
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user