14264 Commits

Author SHA1 Message Date
Franco Fichtner
507ee2768f unbound: argument unused 2022-08-01 12:21:11 +02:00
Franco Fichtner
af959da8b6 rc: use new _setup and repair missing setup.sh in Monit check #5917
Also see: https://github.com/opnsense/src/commit/3edcfbc578f
2022-08-01 11:15:32 +02:00
Franco Fichtner
fe52702a8b firewall: wrong reply"-to" for previous 2022-08-01 10:14:10 +02:00
Franco Fichtner
eebc1674a2 firewall: fix permission of script 2022-08-01 09:55:08 +02:00
Franco Fichtner
520b1b1b9c rc: hardware setup.sh to _precmd #5917 2022-08-01 09:54:22 +02:00
Franco Fichtner
aa2bc6599e rc: remove _var_mfs remants #5917 2022-08-01 09:43:55 +02:00
Franco Fichtner
cf88dbbdd7 pkg: fix plist 2022-07-31 20:46:39 +02:00
Ad Schellevis
b6f95cdea4 Firewall: Aliases - add BGP ASN type. https://github.com/opnsense/core/issues/5913 2022-07-30 02:26:38 +02:00
Franco Fichtner
b5bda2bda4 firewall: also exclude reply-to and route-to
PR: https://forum.opnsense.org/index.php?topic=29554.0
2022-07-31 13:08:16 +02:00
Ad Schellevis
c21cafa924 config events, fix side affect of 3b7453ca2b. 2022-07-29 16:11:04 +02:00
Ad Schellevis
65ceba42f3 System / High Availability - fix for https://forum.opnsense.org/index.php?topic=29521.0, IXR_Library using incorrect constructor format for php 8 2022-07-29 11:08:09 +02:00
Franco Fichtner
86ebdc291e interfaces: more issues with PHP 8 and uptime display #5910 2022-07-29 09:49:58 +02:00
Franco Fichtner
2412d574f3 firewall: reduce impact of link-local inject to FilterRule on matching interface; closes #5907
Now we know why pf(4) does not want to fix this.  ;)
2022-07-29 08:16:55 +02:00
Franco Fichtner
ef0d238ba1 interfaces: typo in script invoke 2022-07-28 21:09:04 +02:00
Ad Schellevis
2d4163d764 VPN: IPsec: Tunnel Settings - Phase 1: Allow to set rightca in mobile ipsec P1 with EAP-TLS (https://github.com/opnsense/core/pull/5906)
o show rightca option
o add empty to ca selection list for backwardds compatibility.

ref https://docs.strongswan.org/docs/5.9/interop/windowsUserServerConf.html
    https://docs.strongswan.org/docs/5.9/plugins/eap-tls.html
2022-07-27 16:17:49 +02:00
Franco Fichtner
6ec65f7407 system: treat files with newlines #5900 2022-07-28 10:08:06 +02:00
Franco Fichtner
20a6e85bff src: style sweep 2022-07-28 10:06:31 +02:00
Franco Fichtner
83524325fc pkg: fix plist 2022-07-28 10:03:42 +02:00
Franco Fichtner
d7b3d61510 system: ensure that _defaultgw files are written #5900
Ok so this might have been an issue in the past WRT DHCP client
and default route hanling which is now done another way but maybe
it shouldn't have.  For now just see how this works in practice
and then decide later if more needs to be done or not.
2022-07-28 10:00:05 +02:00
Stephan de Wit
f8650c76aa
System Status: replace old notices system with a global one (#5875)
* MVC / System status: first draft for backend implementation

* fix copyright

* fix permissions

* MVC / System Status: modify backend implementation and setup front-end

* MVC / System Status: minor cleanup, ACL check and fix reporting in production mode

* MVC / System Status: copy status sytem to legacy as well, remove the notices system, finish up front-end work

* MVC / System Status: remove useless constructor

* fix plist

* System Status: shorten previous

* System Status: add ACL check

* System Status: also remove legacy part

* System Status: also clean up on legacy page

* System Status: ACL check on dismiss action as well

* System Status: add readonly privilege check to dismiss action

* System Status: do not trust input

* System Status: address security concerns

* add default return

* System Status: move js code to separate script and make sure a logLocation is always provided

* System Status: clean up callout in both legacy page and volt template

After dismissing a message and closing the dialog, the old message was still bound to the dialog instance. re-registering the onclick callback solves this.

* System Status: adjust log location and kick off status system on alias errors

* System Status: let's hold off on throwing notifications for aliases for now

* System Status: add ACL entry for the dismiss API call, adjust to new deployment situation

Without the ACL entry, /api/core/system/dismissStatus calls are rejected for non-root users even when they should have rights to dismiss.

Also do a minor consistency improvement and also adjust to the new situation of production & development deployment types. We need to account for the possibility of 'deployment' being empty in the configuration, therefore a direct check of the 'development' type seems most fitting as this is unlikely to change or be subjected to any additions.

* System Status: also error out when unable to write new rules

* System Status: account for users without permissions

* System Status: name collision in FirmwareController

* System Status: replace old notices system with a global one (https://github.com/opnsense/core/pull/5875)

Review feedback / modifications in this commit:

o filter.inc

-- remove wedged message, when locked during parallel reloads it likely doesn't help to disable/enable
-- flush message to error trigger file

o SystemStatus.php
-- str_contains --> strpos; eases testing on OPNsense 22.1.x as str_contains is php 8 only

o Status collectors
-- simplify logic and propagate messages received from status file

o CrashReporterStatus
- the existence of a /tmp/PHP_errors.log  file should be enough to know some process signaled the crash reporter
- remove shell exec

o FirewallStatus
-- as only /tmp/rules.error remains, remove loop to read for non existing files

o opnsense_status.js
-- add opn-status-group class to container and point css modifications in that single direction to prevent other objects from being affected by our status popup modifications
-- windows file endings replaced (^M)

o css:
keep menu_messages container to ease migration for theme developers

NOTE : ** get_crash_report() could likely be simplified as well

* filter: change to mwexec, redirection is implied

* System Status: handle potential undefined array key

seems to be a one-off error: Exception: Error at /usr/local/opnsense/mvc/app/controllers/OPNsense/Core/Api/SystemController.php:90 - Undefined array key 0 (errno=2) in /usr/local/opnsense/mvc/app/controllers/OPNsense/Base/ApiControllerBase.php:159

Co-authored-by: Ad Schellevis <ad@opnsense.org>
2022-07-28 09:50:06 +02:00
Franco Fichtner
9f0ba65615 interfaces: remove out-of-band _defaultgw file writes; closes #5900
IPv4 doesn't do this indicating that IPv6 shouldn't as well.
Also, ifctl is not handling this file either so we might as
well let system.inc deal with this.

PPPoE and DHCP still read the file but wouldn't consider this
a huge problem.

Also now makes sure the scope is added to link-local gateways,
which was a problem previously reported by @maurice-w.
2022-07-28 09:47:10 +02:00
Franco Fichtner
a68aa34b80 src: style sweep 2022-07-28 08:45:00 +02:00
Ad Schellevis
da562090df Lobby / Dashboard / Monit widget - properly cleanse user input 2022-07-27 05:33:23 +02:00
Franco Fichtner
dfdb51cafb interfaces: hide missing mac info
Ever since wlan devices moved to sysctl net.wlan.devices
there is no way to grab a MAC address for any of those
listed there.
2022-07-27 13:24:12 +02:00
Franco Fichtner
e12b4ab36e interfaces: same issue when -i not given
This is only for command line use but we never know how that
might change in the future.
2022-07-27 09:22:56 +02:00
Franco Fichtner
c4be95a387 interfaces: implement ifctl -l awareness for :slaac magic
The default listing had an issue bringing in both the dhcp6c
and the slaac files.  Now act according to what we implemented
as a fallback approach for reading data files.
2022-07-27 08:59:15 +02:00
Franco Fichtner
39283ebf7c interfaces: ifctl experiment is complete #5862
Since "nameserver.sh" was a working title for when we just wanted
to make sense of the nameserver registration mess going on this
no longer fully applies for good reasons.

Change the name to ifctl.sh for leaving syntax parsing in place
and leave the symlink in sbin/ directory.  The same works nicely
for configctl.
2022-07-26 19:57:25 +02:00
Franco Fichtner
a5c02d8ade interfaces: migrate cleanup from interface_bring_down() #5862
Since we already kill routes in nameserver registrations we can
also take on the arp/pfctl magic moving the "router" file check
to its native utility.

It's debatable if we even need the pfctl or arp flush here.

To be continued...
2022-07-26 19:53:56 +02:00
Stephan
38021c30ec php: remove error_reporting(E_ALL) calls
Since these calls exist for the purpose of letting developers know about major issues or deprecation warnings, they can now be removed as a development setting was introduced. https://github.com/opnsense/core/issues/5904
2022-07-26 16:53:23 +02:00
Franco Fichtner
06d5e42569 interfaces: move implementation into private function #5862
Deduplicate code, don't call configd or shell.
2022-07-26 15:36:50 +02:00
Franco Fichtner
1fa0cb3e2d firmware: time for 23.1 development :) 2022-07-26 11:38:44 +02:00
Franco Fichtner
d0a0bdcdbc interfaces: cosmetics for lagg listing 2022-07-25 14:41:55 +02:00
Franco Fichtner
f8da0f2400 unbound: another undefined var 2022-07-25 13:29:58 +02:00
Franco Fichtner
e9298024c1 interfaces: DHCP router to ifctl #5862 2022-07-25 12:03:23 +02:00
Franco Fichtner
b5c0a08a12 interfaces: support :slaac here for now #5862
We could use ifctl but might be better to funnel through configd.
2022-07-25 11:51:50 +02:00
Franco Fichtner
6fe0cdd4b6 interfaces: replace router write with ifctl use #5862 2022-07-25 11:44:03 +02:00
Franco Fichtner
a13849b3db Revert "reporting: legacy log no longer exists"
This reverts commit 48e5f9f2ab8e51dcfe9bbccbf1a5f67d05bafd48.
Keep support for reading text files in this location.

PR: https://github.com/opnsense/core/issues/5892
2022-07-25 11:34:03 +02:00
Franco Fichtner
386b4679b4 openvpn: switch to ifctl use for #5862 2022-07-25 10:43:18 +02:00
Franco Fichtner
2e2e59c1d8 interfaces: move to :slaac suffix use, fixing in ifctl #5862
This breaks the new feature in the interim since the router file
read is not yet supposed to read :slaac counterpart since the router
file is still read manually.  Refactor to follow.
2022-07-25 09:57:41 +02:00
Franco Fichtner
3c18be1086 interfaces: fix two warnings 2022-07-25 09:31:35 +02:00
Franco Fichtner
8db197ebe8 unbound: fix two undefined variable warnings 2022-07-25 09:31:11 +02:00
Franco Fichtner
a02b07a908 interfaces: add iwlwiwi to wireless devices
PR: https://forum.opnsense.org/index.php?topic=29435.0
2022-07-22 14:20:22 +02:00
Franco Fichtner
7135201700 firewall: call closelog() for symmetry
openlog() is already called elsewhere and some components changing
the log facility do the closelog() dance as well.
2022-07-22 13:40:10 +02:00
Franco Fichtner
90db8f4d0f interfaces: widen and improve ifctl use
We do want to eventually lean on exclusive ifctl use in order to
be able to improve logic in ifctl or make adjustments really easy in
the future without missing a spot (e.g. adding scope to link-local
routers).
2022-07-22 10:54:55 +02:00
Maurice Walker
d582435b4b interfaces: add support for SLAAC WAN interfaces w/o DHCPv6 #5862; closes #5883
New script to be invoked by rtsold when Router Advertisements with
RDNSS / DNSSL information are received. Uses ifctl to create the
/tmp/$if_routerv6 file and creates the /tmp/$if_defaultgwv6 file
directly. Fixes the issue that these files don't get created when
the M and O flags in RAs are not set. Also, passes RDNSS / DNSSL
info from RAs to ifctl.
2022-07-22 09:20:12 +02:00
Franco Fichtner
a7ec2175b1 system: move dpinger notification to right spot 2022-07-22 08:52:05 +02:00
Franco Fichtner
9d12fcac3f src: whitespace sweep 2022-07-22 08:51:33 +02:00
Franco Fichtner
52d91d0417 make: remove WANTS/WANT magic
The packages use is too explicit so simply check for installed
debug plugin and hope for the best.
2022-07-22 08:42:09 +02:00
Franco Fichtner
0aa48bc3d7 pkg: fix plist 2022-07-21 21:02:42 +02:00
Stephan
a7858bddb2 Firewall: add missing firewall.conf syslog definition 2022-07-21 17:09:48 +02:00