13690 Commits

Author SHA1 Message Date
Franco Fichtner
b088ff04cb interfaces: merge lines, maybe doesn't belong here #5540 2022-02-07 08:00:48 +01:00
Franco Fichtner
02dc1ebd93 interfaces: prevent DHCP from installing nameservers when not allowed
This was refactored previously and all the logic should live outside
dhclient-script but it seems it's only loosely handled over there.
For now put a check back in the old way and rework this later correctly
from the system.inc point of view: we do want to register nameserver
and searchdomain in the cache files, but should not add a route if
those are not required.  It would be helpful to show them in the overview
regardless (as for DNS servers) but with a hint that they are not being
used.

PR: https://forum.opnsense.org/index.php?topic=26765.0
2022-02-05 08:16:43 +01:00
Franco Fichtner
4dfe599241 interfaces: get_interface_ip*() can validate alias #5540 2022-02-05 07:57:21 +01:00
Franco Fichtner
7f61e5c83d interafce: was not expecting so many issues #5540
1. IP alias was not properly selected when editing after save.
2. VIP detection was only aware of CARP address.
3. Simplify the overview by printing the interface only for CARP
   to unify all 3 cases.
2022-02-04 20:14:39 +01:00
Franco Fichtner
1c088728d2 interfaces: kill array_walk() weirdness #5540 2022-02-04 13:23:16 +01:00
Franco Fichtner
56e11a869b system: avoid array_walk() use loosely related to #5540
While here feed $pconfig back the normalized value for proper GUI display.
2022-02-04 13:08:42 +01:00
Franco Fichtner
611f03e78b system: command drop down size was below screen
PR: https://forum.opnsense.org/index.php?topic=26671.0
2022-02-04 12:58:33 +01:00
kulikov-a
d387c59f5e
Firewall - categories - check state before select (#5538)
Dont select disabled checkboxes
2022-02-03 15:23:07 +01:00
Franco Fichtner
fc51b1541a system: technically correct but reads strange #5493 2022-02-03 07:56:13 +01:00
Franco Fichtner
f6551c982d system: complete the log message #5493 2022-02-03 07:54:42 +01:00
Franco Fichtner
7fa1f8b8be system: only log on automatic far gateway detect #5493 2022-02-03 07:52:09 +01:00
Franco Fichtner
6c12235b07 dhcp: typo 2022-02-03 07:47:45 +01:00
Franco Fichtner
00a86f74db interfaces: shorten list() action where we can 2022-02-02 22:58:39 +01:00
Franco Fichtner
18e87a510b interfaces: forgot these support returning the bits as well
Avoids having to do the split afterwards.
2022-02-02 22:43:11 +01:00
Franco Fichtner
95f3ddaa74 interfaces: mimic IPv4 behaviour, clear up naming 2022-02-02 22:39:04 +01:00
Franco Fichtner
33bc4afb08 interfaces: remove legacy_get_interface_addresses(); closes #4749
Speed up the callers that have $ifconfig_details ready to pass down.
2022-02-02 22:07:01 +01:00
Franco Fichtner
232d1534a3 interface: finally rid the code of find_interface_*() magic #4749
legacy_get_interface_addresses() is now only used once.
2022-02-02 21:51:08 +01:00
Franco Fichtner
934f40bbd9 dhcp: convert the last two #4749 2022-02-02 21:49:56 +01:00
Franco Fichtner
33a2818722 system: remove use of find_interface_network*() #4749 2022-02-02 21:49:48 +01:00
Franco Fichtner
b6582227f5 ipsec: remove find_interface_network*() #4749 2022-02-02 21:27:52 +01:00
Franco Fichtner
db619da624 firewall: replace find_interface_network*() #4749 2022-02-02 21:21:40 +01:00
Franco Fichtner
98291ee0dc interfaces: consistent naming 2022-02-02 21:01:27 +01:00
Franco Fichtner
f5b2d20244 interfaces: second step -- deduplicate code
While here we can actually flip over the ifdisabled bit for SLAAC
trackers.  And rename ominous $linkupevent and $linkdownevent flags.
2022-02-02 20:36:21 +01:00
Franco Fichtner
a7e3d36b0e interafces: stop reacting to simple stop/detach/down events via rc.linkup 2022-02-02 17:04:54 +01:00
Franco Fichtner
2e77966907 interfaces: stop bothering with -k
This easily overlaps daemons and depending on lock structure
and other serialization two daemons could easily deadlock or
play ping-pong over rc.link start/stop situations.
2022-02-02 14:40:27 +01:00
Franco Fichtner
b899fa356a interfaces: configure ondemand ppp in background
The history of this dates back to m0n0wall and it seems what
this tries to achieve is restarting an instance of mpd that
will dial on demand later on so the idea is to start the service
when deconfiguring it.  That might seem "clear" but structurally
there's no reason to run a single shot configure during interface
disable step (likely through rc.linkup stop).
2022-02-02 13:59:58 +01:00
Franco Fichtner
3ccd2f0bdf interfaces: stop mdp5 before starting
An ancinet dragon was woken from its slumber while reworking the interface
configuration code.  All things considered this is more than reasonable
although we do not yet know how this condition can be reached now as opposed
to 21.7 and if the inline termination of mdp5 will not invoke any sort of
deconfiguration (ppp-linkdown) that would harm the impending start of the
service.

PR: https://forum.opnsense.org/index.php?topic=26652.0
2022-02-02 11:39:48 +01:00
Franco Fichtner
e235082f9c dhcp: avoid use of find_interface_network*() #4749 2022-02-02 11:16:13 +01:00
Franco Fichtner
1e992b161d ipsec: avoid use of find_interface_network*() #4749 2022-02-02 11:07:50 +01:00
Franco Fichtner
624f0df355 openvpn: avoid use of find_interface_network() #4749
Given the opportunistic nature of the implementation this might
not make sense for anything but static configurations and that
excludes VIP use.
2022-02-02 11:07:50 +01:00
Franco Fichtner
9486473b2f system: minimal approach to #5493
A little worried runtime configuration might not
be available making a set route not work.
2022-02-02 10:29:03 +01:00
Franco Fichtner
9cf2b221d8 system: detect far gateway situation for #5493
The far gateway flag has some benefits for configuration runs
and validation purposes on the GUI but in the end after lots
of reworks we are able to reliably get a network from the interface
to put the default route on so that we can detect if we are in
need of a far gateway or not.  This is required for automatic
gateways on DHCP that hand out these situations while the
gateway code should not be in charge of flipping on the fargw
bit as it does pertain to runtime interface configuration.

Leave the fargw configuration flag in place for now to let people
test this, maybe backport it earlier and look at fargw more
closely in the remaining use case(s).
2022-02-02 10:12:24 +01:00
Franco Fichtner
a9a67b4255 firewall: default pass all loopback without state tracking; closes #5367
Idea by @kulikov-a.  While arguably not addressing the issue with
unbound-control directly but we can't wait for upstream to do this.
2022-02-02 09:40:20 +01:00
Franco Fichtner
ef9a2e9330 dhcp: quick pass over prefixes.php to support non-clog finally 2022-02-02 09:07:50 +01:00
Franco Fichtner
ecaa9cfcaf unboud: another migration fail discarded IP
Question is when unboudn doesn't start without an IP
why the model does not enforce it.
2022-02-02 08:46:19 +01:00
Franco Fichtner
b4b350ebca interfaces: improve wording a bit more 2022-02-02 08:11:51 +01:00
Franco Fichtner
3499bbf9a5 src: put back whitespace in otherwise unchanged file 2022-02-02 08:07:19 +01:00
Franco Fichtner
c139e03be7 pkg: allow alpha versioning for development 2022-02-02 07:55:48 +01:00
Franco Fichtner
b6ca1be13a firmware: no need to hint at upgrades anymore 2022-02-01 14:22:58 +01:00
Franco Fichtner
add23ab496 firewall: err what, second part of prevous not staged #5517 2022-02-01 13:09:47 +01:00
Franco Fichtner
973dfb1cfd interfaces: flip VIP bind default and enable CARP; closes #5517 2022-02-01 13:06:35 +01:00
Franco Fichtner
7d52700da2 system: forgot to scrub required => false 2022-02-01 12:42:12 +01:00
Franco Fichtner
41ab7fb9f5 system: several improvements to tunables; closes #5504
o Merge defaults and requirements.
o Get rid of get_default_sysctl_value().
o Manually set 'type' for e.g. boot enviroment tunables.
o Cache sysctl map once per boot.
o Edit system defaults for easier override.

While sysctls might change when (un)loading kernel modules the
risk of missing something vital is not given.  We could always
flush the cache file in that case later.
2022-02-01 12:23:00 +01:00
Markus Reiter
2bf4f44c4a
Fix EmergingThreats documentation URL. (#5530) 2022-01-31 14:06:39 +01:00
Ad Schellevis
5278ee5ae3 Firewall: Settings: Advanced - remove ruleset-optimization as this is without function when labels are being used. closes https://github.com/opnsense/core/issues/5529
We have been using labels for a very long time, but since https://github.com/opnsense/core/issues/3312 back in 2019 we literally tag all rules we create, which renders ruleset-optimization completely useless as "label" is treated as a barrier (5b29254770/sbin/pfctl/pfctl_optimize.c (L112))
2022-01-31 10:33:15 +01:00
Ad Schellevis
68138c2973 Interfaces: Settings - improve mesage a bit for https://github.com/opnsense/core/issues/5521 2022-01-31 10:31:53 +01:00
Ad Schellevis
f041bb8ceb Interfaces: Settings - add a note about where these settings apply, closes https://github.com/opnsense/core/issues/5521 2022-01-31 09:57:54 +01:00
Franco Fichtner
308b31dfa8 unbound: fix migration issues
* Domains without names seemed to be possible... just discard those.
* Iterating over empty item produes error.
* AAAA type missing.
2022-01-31 09:44:50 +01:00
Franco Fichtner
d2b9c6eebd src: style sweep 2022-01-31 08:43:25 +01:00
kulikov-a
f530e4fb4b
Logs: add backward compatibility (#5522) 2022-01-30 14:05:28 +01:00