System: Gateways: Configuration: add nosync option
Excluding gateways from synchronization can be useful in cases
where a different default upstream gateway is used to keep
connectivity when failing over in a HA setup.
system: experiment/refactor on cron controller
Importer lint pass says "Cron" isn't used if we use getModel() so
let's see if this holds up. $internalModelClass has the full path.
menusystem: simplify class generation for links and add some support to be used for favorites.
This commit offers a couple of things, first of all it adds a unique class name on every traversable menu item so we can easily use javascript to pass a click event, for example:
$(".menu_ref_7e46272fe380827861cbaf5b484c43c9")[0].click()
We need this in order to link an item, but not use its actual uri in our href later, as this would confuse the "active" item selected.
Next, we offer the option to inject an additional link class ( e.g. $this->appendItem(..,..,['linkclass' => 'my_link_class']); ), as this offers a way to register on the "favorite" buttons.
Finally we cleanup the menu code a bit so the volt and legacy template contain less logic.
MVC: add support for pluggable dynamic menu items and move some existing parts out of the MenuSystem class
In most cases we use static menu registartions, but there are exceptions which depend on interfaces for example.
While looking at https://github.com/opnsense/core/pull/10033, a longer standing wish came up again, which is the reason to add this support right now. It also helps in removing some legacy components for good via plugins.
To register new menu items, the following pattern may be used:
* In your model, derive a Menu class from MenuContainer
* implement a method collect() which should add new menu items via the appendItem() {bound to appendItem in MenuSystem}
Always try to minimize the amount of code inside these plugins as this code will be executed on each page load.
System: Gateways: Configuration: add nosync option
Excluding gateways from synchronization can be useful in cases
where a different default upstream gateway is used to keep
connectivity when failing over in a HA setup.
make: a full file name match should be opened right away
Noticed while adding this to changelog.git as it prints 26.1, 26.1.1, etc
when trying to open "26.1" which is more likely what we want. If we don't
have an exact match the list is still displayed as before.
captive portal: regression in 369630d, allowed addresses missing from session ips
If a client is allowed through a statically configured IP, the MAC
becomes secondary, but in the roaming case the set of actual IPs
relied on the MAC address. Since a statically configured IP may not
have a MAC active at a given time, but we do want to keep this IP in
the captive portal pf zone at all time, we merge the primary IP
with the roaming IPs. As a set this will deduplicate automatically.
While here, no MAC address lookup was performed in the case of a
static IP, add it here so it can be actively seen in the sessions
GUI.
Closes https://github.com/opnsense/core/issues/10124
(cherry picked from commit 2b43ee5b87948347ac5a704c484001d169f059e4)
captive portal: regression in 369630d, allowed addresses missing from session ips
If a client is allowed through a statically configured IP, the MAC
becomes secondary, but in the roaming case the set of actual IPs
relied on the MAC address. Since a statically configured IP may not
have a MAC active at a given time, but we do want to keep this IP in
the captive portal pf zone at all time, we merge the primary IP
with the roaming IPs. As a set this will deduplicate automatically.
While here, no MAC address lookup was performed in the case of a
static IP, add it here so it can be actively seen in the sessions
GUI.
Closes https://github.com/opnsense/core/issues/10124
Services: Kea DHCP: Kea DHCPv6 - fix "Delegated length must be longer than or equal to prefix length" validation, closes https://github.com/opnsense/core/issues/10146
While here, also fix a prefix validation (when x::/64 is specified for example).
Firewall: Rules [new] - refactor searchRuleAction() to use the same filtering and sorting logic on MVC and legacy data.
The current implementation is applying our filter logic twice for MVC records, first it uses the default searchBase() construct, which it then needs to pipe through searchRecordsetBase() again. There are a couple of downsides here, it's more expensive (although the user likely won't notice), but also requires duplication of filter logic.
With the logic introduced in https://github.com/opnsense/core/commit/c81417f26747a9e4e46f608c2791bbae805e79fd , we can extract the exact same content from our model so we can merge all at once and push it through our filtering and sorting logic.
The idea is to be able to "smarten" searchRecordsetBase() a bit so we can apply some additional logic based on types at some point in time, which requires all data to passthrough the same pipeline at least.
This commit should be backwards compatible with the previous code.