15510 Commits

Author SHA1 Message Date
Christopher SHEN
7e8179f827 Makefile: add packages to CORE_DEPENDS_aarch64
The four packages including py${CORE_PYTHON}-duckdb,  py${CORE_PYTHON}-numpy, py${CORE_PYTHON}-pandas, and suricata-devel, can be built on aarch64.
2023-07-26 17:38:51 +02:00
Franco Fichtner
1130442142 firewall: move lock()/unlock() to their final resting place
Simplify the code a little while at it.
2023-07-26 13:09:31 +02:00
Franco Fichtner
0284cb4d34 system: fix unlock() inheriting the lock state 2023-07-26 13:02:08 +02:00
Franco Fichtner
e9a85c33e5 system: close boot file after probing to avoid lock inheritance 2023-07-26 12:42:02 +02:00
Franco Fichtner
77f9b43234 dhcp: forgot 'inet6' selector 2023-07-26 10:06:32 +02:00
Franco Fichtner
ace962a6ff dhcp: returning a "real" device only works if an address is attached
We could remove the change to the primary function but perhaps we will
need it later.  It doesn't hurt either way.
2023-07-26 10:02:55 +02:00
Franco Fichtner
9184457ab8 interfaces: fix locking that was missing CLOEXEC #6637
So the lock was inherited by all exec'd processes and thus was
never released when the script ended or was killed.
2023-07-25 21:41:38 +02:00
Franco Fichtner
015d9b5c7c interafces: logic error in previous #6637 2023-07-25 10:57:20 +02:00
Franco Fichtner
a23b0784c3 interfaces: on forceful IPv6 reload do not lose the event handling #6637
User log reveals that this does happen on bootup.  Actual flow:

    kernel - >>>> Invoking start script 'beep'
    opnsense 6735 /usr/local/etc/rc.newwanipv6: dhcpd_radvd_configure(auto) found no suitable IPv6 address on igb1_vlan10
    dhcp6c 25775 dhcp6c_script: REQUEST on pppoe0 executing
    dhcp6c 29279 dhcp6c_script: REQUEST on pppoe0 renewal
    opnsense 30070 /usr/local/etc/rc.newwanipv6: Lost a forceful reload on WAN[wan]) due to previous lock

Since the IPv6 has reloaded the addresses are back to tentative state.
This commit may create a chain of forceful reloads, but that's nothing
that the system didn't try to attempt previously.
2023-07-25 10:13:56 +02:00
Franco Fichtner
09fc810f66 dhcp: make "found no suitable address" errors a bit more usable #6637 2023-07-25 09:47:16 +02:00
Franco Fichtner
a0013701af interfaces: allow primary address function to emit device used #6637 2023-07-25 09:44:24 +02:00
Franco Fichtner
c9bd89752b wizard: restrict to validating IPv4; closes #6681
The system wizard is IPv4 only but doesn't use the correct
function.  It's debatable if we need to restrict DNS servers
but if all of this is only IPv4 we should stick to it in a
consistsent way.
2023-07-25 09:15:36 +02:00
Franco Fichtner
e5538188a2 firmware: not there yet but start prepping 2023-07-25 08:45:49 +02:00
Franco Fichtner
cb4d15c8bf interfaces: style in header 2023-07-24 10:09:08 +02:00
Franco Fichtner
83bbfbebda interfaces: sort menu in xml file 2023-07-24 10:04:20 +02:00
Franco Fichtner
42abe2e9d4 interfaces: typo and phrasing 2023-07-24 10:00:51 +02:00
Franco Fichtner
4eaaa0e8c1 interfaces: forgot to commit this apparently 2023-07-24 09:57:07 +02:00
Franco Fichtner
592c9a84df system: fix typo 2023-07-24 09:56:46 +02:00
Franco Fichtner
136e403537 system: call opnsense-crypt from opnsense-import; closes #6133
Make sure the man page covers this subject to point people to it
later on.  ;)
2023-07-24 09:53:36 +02:00
Franco Fichtner
dad8bd7543 system: add opnsense-crypt utility #6133 2023-07-24 09:38:13 +02:00
Franco Fichtner
8549485370 system: mute openssl errors pushed to stdout 2023-07-24 09:17:43 +02:00
Franco Fichtner
b7db4316fd src: legacy_bindings.inc already included by config.inc
client_connect.php also includes it but not config.inc.  Try to leave
it at that to not pollute it unnecessarily.  The other scripts might
be able to do it as well this way but don't fix something that is not
broken either.
2023-07-24 08:38:24 +02:00
Ad Schellevis
6487a9b62e Interfaces: Other Types: VLAN - allow manual proto selection, closes https://github.com/opnsense/core/issues/6679 2023-07-21 18:33:34 +02:00
Franco Fichtner
c3db32722d interfaces: remove null_service, empty service name works; closes #6568 2023-07-21 11:39:35 +02:00
Kevin Fason
7366d785a6 network time: support pool directive and maxclock; closes #5569
Added if then to determine if the GUI-provided server is part of the public NTP pool or not. If the hostname ends in 'pool.ntp.org', it will write the entry to ntpd.conf with 'pool' instead of 'server' for that network server. If not then it will write it as 'server'. The pool directive tells ntpd to treat it differently. a 'server'  host is only looked up at service startup whereas a 'pool' host is monitored and changed if it becomes unresponsive or is determined to be a falseticker among other things. ntpd will also pull several DNS entries for each pool entry so I have a followup change to allow configuration of this setting in the GUI, known as 'maxclock'. It sets how many servers to maintain with a default of 10.

This adds support in the GUI for the maxclock system setting. It is used to tell NTPd how many associations (time servers) to maintain. The default is 10 however an odd number is suggested by ntpd docs to make falseticker detection simpler. This change writes what is in the GUI to ntpd.conf.

With the use of the pool directive, ntpd will use more servers than what is listed on the general page. This setting allows the user to set the max number of associations (time servers) to be maintained. Ntpd will use multiple entries from each pool entry that it maintains. Default is 10 but ntpd docs say to use an odd number to make throwing out falsetickers easier. The used is calculated wierdly from the max with the pool entries. For example with a setting of 10 and using the four default X.opnsense.pool.ntp.org entries it will have 6 associations it maintains instead of the 4 listed in the GUI. I went into more detail in the issue itself.

You can use for example, only 'us.pool.ntp.org' and it will maintain 9 associations from this pool. This means the default install configuration could just be '0.opnsense.pool.ntp.org' or, if possible, setup a 'opnsense.pool.ntp.org' so perhaps some documentation changes are in order as well?

I duplicated how the orphan setting is addressed however I did not know how these settings are maintained in a configuration backup so someone smarter may need to address that if required?
2023-07-21 10:22:46 +02:00
Franco Fichtner
24f8eb6632 monit: fix alert script includes; closes #6677 2023-07-21 09:54:28 +02:00
Franco Fichtner
42256caacb ipsec: style change 2023-07-21 09:01:54 +02:00
Ad Schellevis
67addc6577 VPN: IPsec: Advanced Settings - passthrough networks should be added when specified to prevent overlapping "Connections" missing them when no legacy tunnels are used. 2023-07-20 16:25:47 +02:00
Franco Fichtner
4c6e3a1e08 unbound: better check both and investigate later 2023-07-20 13:38:39 +02:00
Franco Fichtner
bf0d6498fc unbound: fix migration when db not enabled 2023-07-20 13:27:34 +02:00
Franco Fichtner
a72c86466b system: spacing 2023-07-20 09:26:17 +02:00
Franco Fichtner
809da1e519 unbound: fix typo 2023-07-20 09:18:13 +02:00
Ad Schellevis
fc7e1ddddf Reporting: Unbound DNS - minor endpoint cleanups (error and input handling) 2023-07-19 16:14:55 +02:00
Franco Fichtner
5ac34a84d5 firmware: fix a small (and old) glitch in the JSON construction 2023-07-19 13:41:04 +02:00
Franco Fichtner
e2630a954c interfaces: style sweep 2023-07-19 11:35:38 +02:00
Ad Schellevis
57077b83f5 Interfaces: LAGG: migrate to MVC closes https://github.com/opnsense/core/issues/6384
Migrate ui to MVC, wrap model around existing configuration area to remain backward compatibility.
To avoid laggs configured via console not being reachable from the gui, add a uuid to it.
2023-07-19 11:27:21 +02:00
Franco Fichtner
1ccb2c9430 system: exclude deprecated until Phalcon is fixed
PHP Deprecated:  Creation of dynamic property OPNsense\Core\Api\MenuController::$request is deprecated in /usr/local/opnsense/mvc/app/controllers/OPNsense/Base/ApiControllerBase.php on line 195
PHP Deprecated:  Creation of dynamic property OPNsense\Core\Api\MenuController::$session is deprecated in /usr/local/opnsense/mvc/app/controllers/OPNsense/Base/ControllerRoot.php on line 149
PHP Deprecated:  Creation of dynamic property OPNsense\Core\Api\MenuController::$security is deprecated in /usr/local/opnsense/mvc/app/controllers/OPNsense/Base/ApiControllerBase.php on line 298
2023-07-19 11:22:45 +02:00
Franco Fichtner
8eaa7adfe6 src: fix deprecations on PHP 8.2 2023-07-19 11:04:33 +02:00
bugfixin
efefa10b18
Allow underscores in DNS names from DHCP leases (#6665) 2023-07-19 09:33:34 +02:00
Franco Fichtner
dd0506971a unbound: more style 2023-07-18 17:28:23 +02:00
Franco Fichtner
2e29bedb60 unbound: style 2023-07-18 17:27:23 +02:00
Franco Fichtner
0318581664 unbound: duckdb migration output tweak 2023-07-18 17:19:01 +02:00
Ad Schellevis
b533835f2b Reporting: Unbound DNS - duckdb version upgrade handling
o make sure DbConnection() throws a new StorageVersionException when storage versions mismatch
o add restore_database() function to overwrite an existing database with the contents of an earlier backup made by the  pre-upgrade hook
o the logger is responsible for the database, on startup, it should validate the version and initialise a restore when there's a mismatch

In case the storage version doesn't match, there are 3 options, the backup is locked (restore running), in which case we exit, the restore went fine and we can start the logger, or there is no backup available, in which case we have no other choice then to drop the unsupported database.

While here, also fix a small issue in stats.py leading to NaN values being returned due to https://github.com/duckdb/duckdb/issues/4066
2023-07-18 16:31:53 +02:00
Franco Fichtner
2be79db6f8 interfaces: introduce a lock and DAD timer into newwanip for IPv6 #6637
There seem to be two issues:

1. Tentative addresses could have always been ignored for the wrong reasons
and we can savely move the delay to this script even though a small delay
will be the result (2 seconds with the default sysctl).  Not sure why this
problem previously not mattered that much, but at least we can move the other
instance of the delay to here and avoid duplication since it will continue
to load this script anyway.

2. Due to overlaps and technical convolution these scripts can be run multile
times in a very short succession especially on a bootup.  Since we have a delay
here now we force a lock prior to "catch" stray invocations.  The only issue
I see is that we could lose the "force" flag in the process, but if that is
the case the log message will reveal and we can work around this sas well with
a two stage log perhaps.
2023-07-18 13:53:48 +02:00
Ad Schellevis
6f48712a7d Reporting: Unbound DNS - modify pre-upgrade export hook, output when skipped or processed and transfer ownership to unbound 2023-07-18 09:54:18 +02:00
Franco Fichtner
74b8f028f5 pkg: fix plist 2023-07-18 09:43:44 +02:00
Franco Fichtner
5d4b437b4e firmware: add 23.7 fingerprint 2023-07-18 08:48:29 +02:00
Franco Fichtner
2965f18e7c firmware: add hint for 23.7-RC1 2023-07-18 08:44:25 +02:00
Franco Fichtner
497e46956a pkg: fix plist 2023-07-18 07:38:28 +02:00
Ad Schellevis
607016502b Firewall: Groups: migrate to MVC ( https://github.com/opnsense/core/issues/6385 ), class name should start with a capital. 2023-07-17 20:05:43 +02:00