Notes:
* Those able to check a proper failover configured system please check if
the Pool Staus table shows up in the top of the Status DHCPv6 Leases page
and that the leases are showing up fine. Thanks
* I am in doubt about the markdown readme file parser_readme.md where it
should be placed in the file system?
Changes since last commit - brief:
1. Making requested changes to follow coding guide lines re. input from jim-p
plus other smaller corrections.
2. Better handling of binding state 'expired'.
3. Style changes to IAID, DUID and Mac/vendor columns on leases table for better
overview / UX and to avoid user scrolling horizontaly, because viewport of table
would otherwise be too small to show all content at once.
4. Removed unused $dip variable from Status DHCPv6 Leases page.
5. Updated $mappings array to an extra dimension to also consist of IAID of the IA-NA.
6. Reordered "Routed to" to have its own column in the prefix table on the lease page
and at the same time include the IAID of the IA-NA, because it gives a better overview
and remembers people that IAID for IA-NA is not necessary the same as the IAID for the
IA-PD.
7. The prefixes table may now break the DUID string anywhere to avoid a scrollbar in
the table.
8. Less code when assigning values, automatic checking + debug enhancements.
All made to better handle when values are assigned to entries that go into the arrays.
Changes since last commit - explained:
2. It has been found during tests that 'expired' was missing. If no other lease has taken
over then we would like to set the fa-ban icon on the status dhcpv6 leases page (it is
shown after the button 'Show all configured leases' has been clicked.)
It has also happened while testing that devices are online while their leases have expired!
3. We allow DUID to break the word onto multiple lines and with a smaller font size for
DUID and IAID. Mac address and vendor id are now on different lines and the vendor id is
shown with smaller text. All done to give the user a better overview.
5. If we didn't the $mappings entry would become overriden by one device (DUID) having
two interfaces (IAIDs) e.g. a cabled+wifi enabled device where both interfaces are on link.
6. It uses a foreach since in rare situation there may be more - but atm. we are not
determining which is the real route! See considerations for the future below re. B.
8. Assigning values gets checked. It is possible to specify a function for assigning
further values and print extra debug messages. If an index in an entry previously has
been set a debug message will be printed (e.g. when the entries of $mappings get
substituted with newer values.)
Things to consider for the future:
A. Should Static DHCPv6 Mapping (services_dhcpv6_edit.php) besides DUID also
consist of an IAID part since one DUID may be shared between different IAIDs?
B. It would be beneficial to pair the prefixes (from the lease table on the
Status DHCPv6 Leases page) with the routes from netstat so that we can show
which routes are actually alive. Also in the rare event where one device (DUID)
has more interfaces (IAID) that are on/off link with pfSense this can come in
useful to see which routes are actually live. When a route is not existing
or we are not on link with the sub router we might want to grey that route out
in the prefixes table of the Status DHCPv6 Leases page.
C. When minimizing arrays (removing superseded entries) for leases, prefixes,
failover pools it might be better to check by (end) date/time than assuming
that the leases nearer to the bottom of the lease file are newer leases
(remove_duplicate).
Two wins:
* We would be sure that nothing overwrites newer entries (does not seem to be
happen though today, because order is followed: Newest entries of a IAID+DUID
is in the bottom.)
* We would remove duplicates while building the arrays and not afterwards.
We would however need to be able to handle situations where newer entries contain
invalid content e.g. missing (end) dates and we would also need to know how to
properly handle failover entries in the pools array.
D. Obviously one day when a proper DHCPv6 server service exists with a proper API
then it would be very interesting to use that instead of reading, parsing and
handling content of a lease file so that current values are simply requested and
returned via the API.
Add GUI prompts corresponding to #7357 that allows users to
enter @ for the hostname, and have it replaced with an empty hostname.
Signed-off-by: Earl Chew <earl_chew@yahoo.com>
Commit 0869605131 removed the
restore_rrd() function. To avoid errors when restoring older configs
remove all callers to it.
Bug: https://redmine.pfsense.org/issues/8231
Signed-off-by: Alistair Francis <alistair@alistair23.me>