]> git.ipfire.org Git - thirdparty/systemd.git/commit
dhcp-identifier: handle too long duid_len in dhcp_validate_duid_len() 2937/head
authorThomas Haller <thaller@redhat.com>
Fri, 1 Apr 2016 12:42:22 +0000 (14:42 +0200)
committerThomas Haller <thaller@redhat.com>
Fri, 1 Apr 2016 13:03:27 +0000 (15:03 +0200)
commit7908dd6730693d7f6a09485b56de7eed0b77afbe
tree103e3299b11085d638e8f95d68e5d8afc57245e0
parent1db30aeab10ca716aae877b298289fe1765f14fb
dhcp-identifier: handle too long duid_len in dhcp_validate_duid_len()

Callers of dhcp_validate_duid_len() know that they must not pass
a zero duid_len. Thus asserting against that is appropriate.
On the other hand, they are not aware of the maximum allowed length
of a duid, as that is the reason why they call dhcp_validate_duid_len()
in the first place. So dhcp_validate_duid_len() should just signal a
regular error.

Thereby, change assert_return() to an assert() as this is an internal
function.
src/libsystemd-network/dhcp-identifier.h