]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/libsystemd-network/sd-dhcp6-client.c
sd-dhcp6: fix check if serverid is set
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 15 Feb 2018 08:37:44 +0000 (09:37 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 15 Feb 2018 09:04:02 +0000 (10:04 +0100)
commit99f1d3fc5043b33dea5faa88f7015a487965333f
treeec926ee72479e164f8c9bcf8f90da1abcd9c2c80
parent21a9905c7a6742b0cf9866f1a6f9ee29f896291e
sd-dhcp6: fix check if serverid is set

Ever since the initial implementation in 631bbe71298ec892f77f44f94feb612646fe6853,
client_parse_message() was supposed to check that the message contains exactly
one serverid. The check that no more than one is given was implemented
correctly, but the check that at least one is given was not. Simplify the whole
thing by making dhcp6_lease_get_serverid() return an error if the id is not
set, and do not require the arguments to be present if the contents of the id
are not needed.
src/libsystemd-network/sd-dhcp6-client.c
src/libsystemd-network/sd-dhcp6-lease.c