dhcp: rework static lease logic
authorHans Dedecker <dedeckeh@gmail.com>
Tue, 12 Feb 2019 15:07:24 +0000 (16:07 +0100)
committerHans Dedecker <dedeckeh@gmail.com>
Mon, 18 Feb 2019 10:43:09 +0000 (11:43 +0100)
commitca8ba91c757b1559bc6391707547d54477c8315a
tree72ec738d9c4cc531b15a001378e795d24062232d
parent36833ea26684b70b0d6093ecec648fe192a582ec
dhcp: rework static lease logic

Rework the static lease logic as the existing logic had different issues.
Static leases are now added in a vlist tree which makes it easier to handle
static lease config changes.
For both DHCPv4 and DHCPv6 static assignments are now created upon the
receival of DHCPv4/DHCPv6 messages as before the static assignment was
created even if the client was not physically present.
In case a hostname is specified in a static lease it won't be overriden
anymore by the hostname received from the client.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
src/config.c
src/dhcpv4.c
src/dhcpv6-ia.c
src/odhcpd.h