]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/libsystemd-network/dhcp-identifier.h
dhcp-identifier: un-inline dhcp_validate_duid_len
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 30 Apr 2016 01:18:02 +0000 (21:18 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 3 May 2016 16:09:38 +0000 (12:09 -0400)
commit3b6a4e97eab023f3792efde5bcb82a6e2688b15c
treef05e99fbe9fc0ab9dc30d293b68837f8e2cfa03a
parentf7a92d1a7e351886fc1debb7f4b448287d18c20c
dhcp-identifier: un-inline dhcp_validate_duid_len

After all it is used in more than one place and is not that short.
Also tweak the test a bit:
- do not check that duid_len > 0, because we want to allow unknown
  duid types, and there might be some which are fine with 0 length data,
  (also assert should not be called from library code),
- always check that duid_len <= MAX_DUID_LEN, because we could overwrite
  available buffer space otherwise.
src/libsystemd-network/dhcp-identifier.c
src/libsystemd-network/dhcp-identifier.h