Firewall: Rules [new] - split search logic and normalize legacy output, closes https://github.com/opnsense/core/pull/9346
The search filter logic is quite difficult to read, in order to improve readability, move various data formatting actions into their own methods.
system: rework previous again to align with the other code
Only define to null if not set and use it directly. The actual
interface configuration is already stored and so is 'if' but since
it may be accessed in error cases it's nicer to enforce that the
key exists like is the case with ipaddr(v6).
interfaces: emit 'devices' in legacy interface iterator
Do the array rather than the single one because the feature was not
rooted here and we can always revert to a simpler 'device' key if
needed.
interfaces: reduce use of get_real_interface() and $realifXXX variables
Building on the last commit we can get rid of most of the trickery in cases
where we know the device is going to be stored under 'if'.
Although 6rd and 6to4 magic isn't completely gone there may be a future
without it and it's going to be pretty nice.
interfaces: support link-local IPv6 mode; closes #9328
At the moment we don't transition out of this again as ifdisabled is
not changed afterwards for tunnel device reasons, but maybe this needs
to be made more clever in the future.
Shuffle the remaining $realifv6 idiosyncrasy to 6rd 6to4 spots in the
code and don't make link-local eligible for PPPoE or gateways at this
point. Both could work under certain constraints but since we never
had this feature before going two steps ahead doesn't seem very sensible.
interfaces: go through Autoconf for a bit of style
My fault entirely looking at it for the previous issue.
(cherry picked from commit deab7e1ba34b0ae40083da89f7d1484d83584845)
system: amendment for previous #9356
Keep API return data consistent and don't modify the existing
returns as the output differs slightly from raw model data and
should be kept this way.
system: switch int/bool to string in gateway properties; closes #9356
This is a broader commit for what looks like the right thing to do
for all fields actually anchored in the model for which even BooleanField
returns a string representation of the value. Most should be benign but
the ones in Gateway.php and SettingsController.php should fix API display
issues.
Interfaces: Neighbors: Automatic Discovery - add new hostdiscovery feature
This splits the Neighbors menu item in an existing static assignments and adds the automatic discovery feature which includes logging and insights into the currently known hosts on the network. When automatic discovery is disabled, it drops back to arp/ndp.
By default automatic mode is enabled on all interfaces, but configuration options exists (to limit interfaces and networks).
Other consumers which require host mappings can use the /usr/local/opnsense/scripts/interfaces/list_hosts.py script to either fetch the sqlite database or arp/ndp data for the selected pprotocol(s).
More information about the hostwatch daemon is available at https://github.com/opnsense/hostwatch