This was refactored previously and all the logic should live outside
dhclient-script but it seems it's only loosely handled over there.
For now put a check back in the old way and rework this later correctly
from the system.inc point of view: we do want to register nameserver
and searchdomain in the cache files, but should not add a route if
those are not required. It would be helpful to show them in the overview
regardless (as for DNS servers) but with a hint that they are not being
used.
PR: https://forum.opnsense.org/index.php?topic=26765.0
Moral of the story: don't try to call backend scripts to grab env
variables that you could easily read using the acual nameserver
script sort of like dhclient-script is doing it.
ALLOWOVERRIDE is silly as we guard against that in get_nameservers().
o Only operate the /var/db IP files via rc.newwanip(v6)
o Consistenly flush a cache IP on a triggered reload
o Remove IPv6 address removal workaround from https://redmine.pfsense.org/issues/2627
o Assume that IP is properly checked making $cacheip != $ip a valid assumption when $cacheip is empty
o Remove creation from dhclient script
Most of the system already uses it and users are informed about
it too. Might just be a good time to write a little manual page
for it...
While here some use of daemon -f suggests that configctl -d should
be used more widely than it is now.
This is more or less a proof of concept, we probably best change the api endpoint data as well to push in/out in the same record so we can also ship the details underneath for those interested.
some people seem to miss the numbers, since the top host graph uses the same information over time, it wouldn't hurt to add a tab containting the raw numbers for the selected interfaces.
The current version doesn't limit the number of results, we might need to add a limit at some point in time, depending on how many results iftop samples.
general remarks:
o total amount of traffic is not being displayed, although we could count the "cumulative" from iftop, the numbers would always be flawed (since sampled with an interval)
o no reverse lookups, maybe for a future version, let's first see if this helps.
o hosts not seen for 120 seconds will automatically be removed from the list (fixed ttl)
o refactor data collection action, use interface unique names (lan, wan, opt1, ...)
o reduce data fetch calls, update both graphs in the same poll
o hook in color labels from chartjs-plugin-colorschemes.js
There's no real world evidence this works or is needed today.
We do have to other state kills / flushes now, one works and
the other may be defunct. To progress this remove this arcane
script and if the need arises rewrite it as something portable.
See: https://redmine.pfsense.org/issues/1629
Also see: https://redmine.pfsense.org/issues/2887