more error resilent dhcp client processing + API update
We are having two problems here:
-
According to latest docs the format of
dhcp.host
is a bit different than expected. see https://openwrt.org/docs/guide-user/base-system/dhcp#static_leases -
The problem is that we have
set_dhcp_client
api call which should set static dhcp assignment, but we are on able to list such settings. The list of dhcp clients obtained fromget_settings
shows only those clients which are active. So we are unable here to delete/alter inactive clients.
So what we probably should do:
-
display all dhcp_clients in get_settings
(from/tmp/dhcp.leases
as well as from uci) -
don't include records without IP address in get_settings
(we can simply ignore them) -
note that ip
can also containignore
string to indicate that mac address should be excluded from dhcp assignment -
enable to process and edit multiple mac addresses -
make sure that it works for both lan and guest networks