13714 Commits

Author SHA1 Message Date
Franco Fichtner
dc0b0e1069 interfaces: clean up lagg configure a bit more 2022-02-10 09:58:51 +01:00
Franco Fichtner
0d74151ed8 interfaces: kill VLAN creation side effect #5540 2022-02-10 09:52:06 +01:00
Franco Fichtner
af59ab65b3 interfaces: parentesis fix 2022-02-10 09:28:29 +01:00
Franco Fichtner
111413c902 interfaces: $realif is no longer used 2022-02-09 20:14:12 +01:00
Franco Fichtner
ce820a275f interfaces: simplify legacy_interface_destroy() use 2022-02-09 20:13:09 +01:00
Franco Fichtner
0afd99a4ab interfaces: boot now produces errors #5540
Between testing and just trying to destroy an interface lies no
performance benefit.
2022-02-09 20:06:45 +01:00
Franco Fichtner
13deb2ce0f interfaces: make the world simpler #5540
Make a few assumtions about complexity:

1. We can stack bridges on top of GREs stacked on top of GIFs.
2. We do not stack any virtual device on itself.
3. VIP handling in GIF/GRE is ok to coalesce if we simply create
   VIPS before we start doing GIF/GRE.  Bridges follow GIFs as before.
5. The reason we create unassigned devices is to assign them via GUI.
6. We do not need to run inline device creation when we assure they
   are already there before we configure.
2022-02-09 09:36:09 +01:00
Franco Fichtner
1c3860ad6c interfaces: unused reference
It's not really faster.
2022-02-09 09:23:04 +01:00
Franco Fichtner
5ce896e367 interfaces: kill LAGG creation side effect #5540 2022-02-09 09:16:33 +01:00
Franco Fichtner
5f6b380a33 interfaces: get_interface_list() must exclude OpenVPN 2022-02-09 09:03:32 +01:00
Franco Fichtner
9174a15c45 interfaces: rename $special to avoid ambiguity #5540 2022-02-08 19:37:05 +01:00
Franco Fichtner
6f02badc5c unbound: dnsbl same same
Since this is used from cron we need to ensure the restart "atomically".
2022-02-08 17:41:26 +01:00
Stephan de Wit
47e4dad620
unbound: host overrides: use legacy reconfigure and reduce configd calls (#5553)
Makes sure the 'Apply' button actually does something, since
the host overrides are configured via the legacy section.
2022-02-08 17:38:34 +01:00
Franco Fichtner
119d6e981b interfaces: clean up GRE same as GIF #5540
The IP alias implementation differs between GIF and GRE with
GRE being worse off since 'if' can be the IP alias and we have
no quick way of looking up the VIP.  Will address later...
2022-02-08 10:19:32 +01:00
Franco Fichtner
067cd0cd77 interfaces: remove unused function 2022-02-08 10:19:32 +01:00
Franco Fichtner
e03c12f3a5 Revert "interfaces: configd action for device creation #5540"
This reverts commit 376481a842b0bd06ebb16b1026d436c50c7479e1.
Discussed internally.  Only need one step forward for now.
2022-02-08 10:19:32 +01:00
Franco Fichtner
4b0ebb04da interfaces: fix typo #5540 2022-02-08 10:19:32 +01:00
Stephan de Wit
65fd3c88a8
Unbound: overrides: fixup UI and validation due to model change (#5542)
* Unbound: overrides: fixup UI and validation due to model change

* Unbound: overrides: add back references
2022-02-08 10:10:28 +01:00
Franco Fichtner
1f8399dfed interfaces: make sure to solve the _vip crisis with GIF use #5540
Anytime $gif['if'] is used the underlying function either needs to
handle _vip (CARP) case on its own or we need to shave off the CARP
designation before passing it on to not cause any mismatch on lookup.
2022-02-08 08:41:37 +01:00
Franco Fichtner
376481a842 interfaces: configd action for device creation #5540 2022-02-07 20:03:08 +01:00
Franco Fichtner
adc0af05e4 interfaces: kill the gifif-empty side effect #5540
This can only happen from the GUI when we try to inject a new
interface and we don't know the device name yet.  Split this
into a device creation which reserves the name for us and move
that to configd in the next set.  This also has the benefit that
the GUI page now does configuration-after-write which it is
supposed to do.
2022-02-07 19:47:36 +01:00
Franco Fichtner
8726f6849a interfaces: style on MTU changes 2022-02-07 19:44:45 +01:00
Franco Fichtner
6866efff70 interfaces: adjust MTU configuration #5546
1. Use the shared $interface_details instead of reading system state
   again.
2. Read and set parent device MTU before attempting to set the current
   device MTU.  The OS has a soft-fail on overlong MTU so we can ditch
   the capping of the value.
3. Unify the test and apply code for both cases.
4. Remove follow up block that enforces problematic situations
   by only trusting the system state.  Integrity should already
   be taken care of in GUI and configuration.

If the system fails to configure a "valid" MTU for driver reasons
we cannot catch it but then the user has bigger issues and ifconfig
exit will indicate something is wrong.
2022-02-07 10:56:32 +01:00
Ad Schellevis
3b9859e07b Firewall: NAT: Port Forward - synchronise "disabled" flag on linked firewall rule.
It might make sense to hide the click events in the firewall rules as well (same as the missing edit button), as we can't warrant settings being async at some point.

closes https://github.com/opnsense/core/issues/5548
2022-02-06 21:18:42 +01:00
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