chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
8c67d0a
)
sd-dhcp6-client: Make end of successfull option parsing explicit
author
Patrik Flykt
<patrik.flykt@linux.intel.com>
Wed, 10 Dec 2014 14:17:30 +0000
(16:17 +0200)
committer
Tom Gundersen
<teg@jklm.no>
Wed, 10 Dec 2014 17:31:21 +0000
(18:31 +0100)
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.
src/libsystemd-network/sd-dhcp6-client.c
patch
|
blob
|
history
diff --git
a/src/libsystemd-network/sd-dhcp6-client.c
b/src/libsystemd-network/sd-dhcp6-client.c
index 8537d7cc86434f004f90ea365a343dc3882c6fe7..cc5b74416ffdb6dcffe02be90f0e63da783318d5 100644
(file)
--- a/
src/libsystemd-network/sd-dhcp6-client.c
+++ b/
src/libsystemd-network/sd-dhcp6-client.c
@@
-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;