Franco Fichtner
676e9581dd
interfaces: match validation and mask in LAGG
2023-10-24 14:24:52 +02:00
Franco Fichtner
dccf9143c2
interfaces: improve neighbor form
2023-10-24 14:24:32 +02:00
Franco Fichtner
16d0a071ad
interfaces: fix the intricate cleanup of link-local VIPs
...
The VIPs are bound to the scope so we need to add it to the
address lookup. From the controller emit the same "@" usage
which is used to indicatge a scope, but not no a network
device. If encountered translate the scope back to a network
device and use the proper "%" syntax.
2023-10-24 10:37:38 +02:00
Ad Schellevis
ad2e5e7515
Interfaces: Virtual IPs: Settings - fix config locking when deleting a node.
...
This is a bit of a tricky one, delBase() always locks, which enforces the proper sequence in concurrent operations, but when reading the config first with getModel(), we are locking the wrong state (memory doesn't equal disk anymore).
2023-10-24 10:11:47 +02:00
Ad Schellevis
b0f3e131f5
mvc/OptionField type - fix regression in bc195308be , can't make choices static, unless we would serialize $data's payload first. to avoid further issues, just go back to always setting the values.
2023-10-23 16:59:13 +02:00
Franco Fichtner
8228f5de5f
system: need to detect a password shift from off <=> on
...
This doesn't check a shifting password for other technical
reasons but is more correct and fixes toggling disabled
authentication on my end.
PR: https://forum.opnsense.org/index.php?topic=36528.0
2023-10-23 11:25:45 +02:00
Ad Schellevis
a99f2600a5
backend: template helpers. Add physical_interface and physical_interfaces as helper functions to remove the need for a separate macro to map interface names. Eventually we might consider removing the macro as well, but since the plugins use it heavily, we can't do that right now.
...
The new physical_interfaces() helper simplifies the constructions where we just need a list of configured device names, skipping the ones that don't exist.
Refactor existing core templates to remove the use of the interface.macro file.
2023-10-22 17:46:34 +02:00
Ad Schellevis
71e8201e5a
Firewall/Aliases - fix regression in BaseContentParser, throwing an error due to not being hooked to an alias anymore. Since we don't know its origins, the plain address is likely the best next best thing to log here.
2023-10-21 10:03:54 +02:00
Ad Schellevis
d09fdd53c1
VPN: WireGuard: Settings - fix some small cosmetic issues in the volt template
2023-10-20 18:28:52 +02:00
Ad Schellevis
4bef809bd0
VPN: WireGuard - fix wireguard group registration, as our reconfigureAction() is custom, we can not use invokeInterfaceRegistration() here.
2023-10-20 17:54:58 +02:00
Stephan de Wit
c2d07aeef6
wireguard: move route reconfigure to wg_start
...
we shouldn't attempt to reconfigure the system routes if wireguard
isn't enabled.
2023-10-20 16:23:27 +02:00
Franco Fichtner
845ba727c8
firmware: fix forward compat with pkg 1.20 being backwards incompatible
...
Ok, so now we work with 1.20 but cannot use it because we can't render
the repo file before pkg updates itself and causes it to malfunction.
That means we cannot add 1.20 before 24.1.1.
Even if we fixed our mirror to be SRV compatible two facts remain:
1. We cannot control third party mirrors which will likely all be
plain HTTP(S).
2. pkg 1.20.x from FreeBSD will still break firewall operation and
upgrades if left on the system so we make the situation better now
to bite the user later on.
2023-10-20 11:59:06 +02:00
Ad Schellevis
41b8feec94
Interfaces/neighbor - although camel case works in endpoints, better to underscore the actions as phalcon's routing expects camelcase to underscore ( https://docs.phalcon.io/3.4/en/routing#defining-routes )
2023-10-19 21:35:03 +02:00
Franco Fichtner
edeff46f3f
system: ok it's an Error then
2023-10-19 13:14:20 +02:00
Franco Fichtner
9e9be4351f
system: add trad. Chinese
...
It's already over 30% but needs to be vetted first. Language
pack that includes this is 23.7.7.
2023-10-19 11:49:10 +02:00
Stephan de Wit
24b5fdc42e
interfaces: do not flush states on clear
...
flushed states are propagated to pfsync, which means a machine
in backup state is still vulnerable to any event that hooks
into the interface_bring_down logic on the primary machine.
2023-10-19 11:34:23 +02:00
Stephan de Wit
eecc882825
openvpn: do not flush state table on linkdown
...
This has the effect of killing valid states possibly unrelated to
openvpn that are propagated via pfsync
2023-10-19 09:59:47 +02:00
Franco Fichtner
5b2f7f4423
interfaces: missing copyright header here too
2023-10-19 09:11:16 +02:00
Franco Fichtner
07ef4ac3ea
ipsec: spacing and missing copyright header
2023-10-19 09:07:35 +02:00
Franco Fichtner
19f089a73a
ipsec: change the spacing, add copyright year due to recent changes
2023-10-19 09:02:40 +02:00
Franco Fichtner
047b25cc2d
system: adjust the dialog presentation a bit
...
The danger representation is a bit over the top for deleting
a backup. The revert is a bit too lax. So move both to a
warning and indicate that the yes button is the one that should
be clicked in these cases, but in the same warning color as the
modal itself. While here change the title to something more
appropriate.
2023-10-19 08:58:11 +02:00
Franco Fichtner
24a7fbe4f0
ui: fix the styling of the base form button when overriding the label
...
As seen on the packet capture page.
2023-10-19 08:49:59 +02:00
Franco Fichtner
ba34c05086
mvc: style sweep
2023-10-19 08:43:11 +02:00
Ad Schellevis
3a70baedec
MVC/PortField - minor regression in setEnableAlias() always turning our content into lower case items. since known portnames are lowercase, let's check if case matters and only lowercase in these cases.
2023-10-18 20:44:02 +02:00
Ad Schellevis
0d724ec850
MVC / form handling (opnsense.js) - regression in optgroup handling introduced in 9206823d60
...
Two issues found, when optgroup is not used and filled with an empty item, the length of the group seems to be 0. To retrieve the selected values, we should use val() as iterating the children of the select won't return the options anymore.
2023-10-18 20:27:57 +02:00
Ad Schellevis
3b2a0c9a75
System: Configuration: History - missing dropdown cleanup after file removal. closes https://github.com/opnsense/core/issues/6944
2023-10-18 18:17:40 +02:00
Franco Fichtner
7c052881fa
interfaces: numbering is hard
2023-10-18 15:06:29 +02:00
Franco Fichtner
16ce982fa6
system: keep polling if watcher cannot load a class
...
This happened two times now...
[09-Oct-2023 19:25:44 Europe/Berlin] PHP Fatal error: Uncaught Error: Class "OPNsense\Base\ModelException" not found in /usr/local/opnsense/mvc/app/models/OPNsense/Base/BaseModel.php:314
Stack trace:
thrown in /usr/local/opnsense/mvc/app/models/OPNsense/Base/BaseModel.php on line 314
2023-10-18 14:23:21 +02:00
Franco Fichtner
3778fee6d1
system: restructure previous a little
2023-10-18 14:18:28 +02:00
Franco Fichtner
2332d8e4a9
system: improve and fix the restore rework #6901
2023-10-18 13:56:58 +02:00
Franco Fichtner
b8965c687e
interfaces: restore gateway assignment for the time being
2023-10-18 12:01:42 +02:00
Franco Fichtner
515ed16354
system: scrub artefact
2023-10-18 11:44:09 +02:00
Franco Fichtner
4b932622dd
system: use unified style for "return preg_match" idiom so the caller receives a boolean
2023-10-18 09:52:32 +02:00
Franco Fichtner
89ee4109bc
interfaces: ignore ULAs for primary IPv6 detection #6939
2023-10-18 09:49:14 +02:00
Franco Fichtner
1e86114a05
system: change wait time to 1 second per round in console
...
Sync both prompts to 7 seconds. It will reduce boot wait time
from 9 + 2.5 * 5 = 21.5 seconds to 7 + 7 = 14 seconds.
2023-10-17 11:10:00 +02:00
Ad Schellevis
dc94c78015
Gateways: Single - as part of the migration strategy we moved most of the boilerplate in our master branch, this just has the side affect of storing default (unchanged) values in system_gateways_edit.php. This commit aims to prevent these entries from being stored to offer a smoother migration to MVC later.
2023-10-17 09:13:11 +02:00
Franco Fichtner
4ae21be887
mvc: copyright header style
2023-10-17 09:07:17 +02:00
Franco Fichtner
272fa3335c
firmware: more wording
2023-10-17 08:56:18 +02:00
Franco Fichtner
be87fa7f4d
firmware: adjust boilerplate text a little
2023-10-17 08:33:30 +02:00
Franco Fichtner
a224ff4a2b
dhcp: sort this a little better, loosely refs #6942
2023-10-17 08:15:46 +02:00
Ad Schellevis
854043daa1
Firewall: Log Files: Live View - change cleanup a bit so it keeps filtered items longer available. The trick in this case is relatively simple, by splitting the cleanup in visible and invisible items, we keep visible items longer on screen at the (small) cost of using a little more memory.
...
might solve part of the problem https://github.com/opnsense/core/issues/6833 tries to solve.
2023-10-16 20:46:16 +02:00
Franco Fichtner
788f857a40
mvc: style sweep
2023-10-16 15:10:10 +02:00
Franco Fichtner
e0e1401f87
interfaces: add no_dad to staticv6; closes #6913
2023-10-16 15:10:03 +02:00
Franco Fichtner
0785e337e9
wireguard: different approach to bootup handling
...
Since we used to allow IP configuration ands VIPs are
a possibility we can avoid checking for missing IPs
and simply delete the status hash file which will
force an eventual reconfiguration.
While here avoid wireguard_prepare() from creating spurious
devices when there is no need for it as it happens with
manual invoke through "pluginctl -d wgX". wg-service-control
uses the same logic.
2023-10-16 13:40:10 +02:00
Ad Schellevis
c3c9beaebe
pluginctl - minor change to previous, only show plugin name instead of origin of the call.
2023-10-16 11:42:59 +02:00
Ad Schellevis
df54b2d0f6
pluginctl - improve listing plugins of selected type, this contains two modifications:
...
1] bugfix to show services on -s
2] when showing event hooks, also display the functions attached to it.
2023-10-16 11:19:42 +02:00
Franco Fichtner
bef67b3e5d
mvc: copyright header style
2023-10-16 08:31:32 +02:00
Ad Schellevis
967767591b
VPN: IPsec: Connections - simplify optgroup as a result of changes in bc195308be
2023-10-15 14:51:48 +02:00
Ad Schellevis
bc195308be
mvc: OptionField - add support for the optgroup in a one level deep nesting construction. This offers the ability to use the optgroup frontend glue added in 9206823d60 using an OptionField definition like:
...
<field type="OptionField">
<OptionValues>
<opt1 value='option group 1'>
<opt1 value='option1'>option 1</opt1>
</opt1>
<option_group2>
<opt2>option 2</option2>
</option_group2>
</OptionValues>
</field>
2023-10-15 14:35:31 +02:00
Ad Schellevis
09cabd9877
Core/Config - add hasChanged() to detect changes to the config file from other processes in a lightweight mannner. closes https://github.com/opnsense/core/issues/6798
2023-10-15 14:12:28 +02:00