1) If there is a Client Id specified then show it (otherwise it is possible to define a Static Mapping that has only Client Id and all other fields empty, which would look like an empty row in the displayed table).
2) Ignore empty static lease entries - when an interface has no static mappings the "static" section of the DHCP server settings can be "" which was resulting in a single-element that was empty being displayed as an empty row.
3) If there are no leases to display, then make a row with the message "No leases to display" so the user knows the system at least tried.
4) If there are no leases in use, then make a row with the message "No leases are in use" so the user knows the system at least tried.
When the interface concerned does not yet have its details known (e.g. Track Interface values from upstream have not come yet) then we might as well at least give the caller some reasonable text.
e.g. I was adding V6 Static Mappings on an interface that has "Track Interface" and no IPv6 delegation yet. The error message that tries to tell me the type of input I need to put or the static IP offset had no example at all.
This code would accept an IPv6 address, but that causes an error to be reported by the DHCP (v4) Relay service on startup.
Validate the destination server IP address(es) to ensure they are IPv4.
The vidconsole needs to be explicitly disabled for PC Engines APU2,
otherwise the comconsole is garbled and mostly unusable during the
boot block and boot loader.
While looking at interactions between DHCP Relay and DHCP Server, I noticed a few annoying/inconsistent things in driving the UI:
1) If there were validation errors on the Destination Server IP Addresses that the user input, messages would be given about invalid addresses but the data in the Destination Server row(s) would be reset to what it was before the user started editing, losing whatever they changes they had been trying to make so far.
2) Empty rows would be reported as errors. The code already did some ignoring of empty rows, but not entirely successfully.
This change:
a) Reports which IP addresses were invalid
b) Preserves the data that the user tried to enter, so they can correct it and try again.
c) Ignores any empty rows, only reporting an error if all the rows are empty.
During boot local_sync_acocunts() should be able to access LDAP server
on a non-local network or also resolve LDAP server hostname. To make it
possible move calls to create static routes and start dnsmasq/unbound
to run earlier