14466 Commits

Author SHA1 Message Date
Franco Fichtner
2a6845a6fb interfaces: tried keys before but list() is too dense 2023-09-18 10:52:40 +02:00
Franco Fichtner
db5c43d106 interfaces: allow clean MVC acces to primary address
POC for IPv4.  Acme-client is being naughtly.
2023-09-18 10:18:34 +02:00
Franco Fichtner
6a4d6a6f5a interfaces: sync up gre code with IPv6 changes in gif
And fix a typo in previous gif code and restructure slightly.
2023-09-18 09:47:22 +02:00
Franco Fichtner
a10c1b5a36 system: remove unused 2023-09-18 09:32:13 +02:00
Franco Fichtner
2f3dd72d77 interfaces: change "realifxyz" vars to more sensible names 2023-09-18 09:32:01 +02:00
Franco Fichtner
2340751540 interfaces: special treatment of IPv6 remote address cases
PR: https://forum.opnsense.org/index.php?topic=35876.0
2023-09-18 08:47:13 +02:00
Franco Fichtner
cbaf7cee1f interfaces: use interfaces_restart_by_device() where appropriate 2023-09-15 14:50:23 +02:00
Franco Fichtner
6ea9d216e2 interfaces: 0e2751d2d means default gateway switching no longer requires this #6852
The change is not immediate but the watcher will take care of it.
2023-09-15 14:23:21 +02:00
Franco Fichtner
90ac0df95d system: setting $reloadif was removed in e40b64d5ba7 2023-09-15 13:40:06 +02:00
Franco Fichtner
22a2cc9836 system: clear a few legacy DynDNS leftovers 2023-09-15 13:21:49 +02:00
Franco Fichtner
496c1c787d openvpn: emit device name upon creation 2023-09-15 08:50:39 +02:00
Franco Fichtner
fa1efd0506 interfaces: signal wlan device creation success/failure 2023-09-15 08:46:20 +02:00
Franco Fichtner
6ccacaf0f9 web proxy: scrub model 2023-09-15 08:16:04 +02:00
Franco Fichtner
89386073f1 captive portal: scrub model 2023-09-15 08:10:12 +02:00
Franco Fichtner
231b4cde1e system: scrub syslog model 2023-09-15 08:09:19 +02:00
Franco Fichtner
9fa0e3c493 firewall: scrub shaper model 2023-09-15 08:07:18 +02:00
Franco Fichtner
b122a0ad71 intrusion detection: scrub model 2023-09-15 08:05:21 +02:00
Franco Fichtner
b57b43c34f openvpn: scrub model 2023-09-15 08:03:18 +02:00
Franco Fichtner
6ffb8d4468 ipsec: scrub models 2023-09-15 07:59:30 +02:00
Franco Fichtner
d1f389d788 monit: scrub model 2023-09-15 07:55:06 +02:00
Franco Fichtner
eb41f24d6a interafces: fix typo in previous 2023-09-14 21:56:05 +02:00
Franco Fichtner
49df30eb83 interfaces: do not annotate disabled state for members
Recently did the same for Unbound.  The context for the user is clear
and we shouldn't be too concerned for what the user thinks about disabled
interfaces since he disabled them in the first place.

Use the same interface description source in the overview page.
2023-09-14 21:46:52 +02:00
Franco Fichtner
3dae3b507a unbound: scrub model, no functional changes 2023-09-14 21:40:25 +02:00
Ad Schellevis
9fb7c048d7
VPN/OpenVPN/Instances - Update dialogCSO.xml and fix route gateways title 2023-09-14 18:11:05 +02:00
Franco Fichtner
1aa5848847
unbound: migrate active/outgoing interfaces discarding invalid values (#6851) 2023-09-14 17:45:22 +02:00
Franco Fichtner
15ee80908f unbound: remove spurious <hr/> as __mt does the job and looks cleaner 2023-09-14 14:06:10 +02:00
Franco Fichtner
a086f40b0a unbound: bring back 4a1bc9f8b5e to avoid dynamic reloads when possible; closes #6802 2023-09-14 14:00:29 +02:00
Franco Fichtner
fe17f4ff48 unbound: allow disabled interfaces in interface field
While we are not concerned with interfaces that have disappeared
we should keep track of disabled interfaces since there is no strict
link between this field and the interface (or OpenVPN) configuration
which would make validation fail for the wrong reasons and/or force
the user to deselect the interface in order to proceed.

Also exclude lo0 because it is always added to ensure local resolving
which had no complaints since 2018 when this was reworked.  The abilty
to select it would cause the question of why it's not adhered to if
anyone started looking.
2023-09-14 10:51:51 +02:00
Franco Fichtner
2306449329 interfaces: fix typo 2023-09-13 13:00:47 +02:00
Franco Fichtner
c4285c9937 interfaces: if members for bridge could not be added change return code 2023-09-13 11:26:55 +02:00
Franco Fichtner
189e3af29e interfaces: improve bridge code a bit
* Allow the bridge to come up without members.  While the GUI made sure
  to avoid empty bridges there is no reason for it and underneath if the
  interface was disabled the GUI made the interface disappear from the
  selection.  So now allow an empty bridge (may be nice for migration)
  and show disabled interfaces in the edit page.  Fix all callers to not
  assume the member property is always set.  Can probably go away once
  bridges are moved to MVC.
* Inline interface_bridge_add_member() since link_interface_to_bridge()
  is the only caller.  Improve the parameter passing a bit too.
* Add bridge interface return code to (_)interfaces_bridge_configure().
* Improve device resolution and a few mwexecf() replacements.
* Log the reason why a device could not be attached to bridge when one
  device is not there as expected.
2023-09-13 10:39:49 +02:00
Franco Fichtner
818f729379 system: avoid picking up an empty default route
GIF/GRE might do this when assigned so extend the check.
2023-09-12 11:38:58 +02:00
Franco Fichtner
da4144180b interfaces: refactor link_interface_to_bridge() slightly 2023-09-12 11:15:17 +02:00
Franco Fichtner
58b45cd533 interfaces: kill the ancient OpenVPN-tap-on-a-bridge magic on IPv4 reload
This brings IPv4 and IPv6 closer together as both now support GIF/GRE
exclusively.  OpenVPN devices are created on boot since 44cd7aee8e.
2023-09-12 11:01:53 +02:00
Franco Fichtner
a744327574 interfaces: improve GIF/GRE configuration robustness
Now that we fail if we can't get the tunnel up improve this a bit more:

1. First order of business is adding removing/adding the device.

2. Return the device name when configuration was successful.

3. Use device name return to avoid "linking" failed devices.  This
   helps us to bring it up later when it is likely ready.

4. Remove the system_routing_configure() madness from device creation.

5. We may have static routes which were not adhered to previously.  So now
   use the same interfaces_restart_by_device() hook but omit the
   interface_configure() to void unwantend recusion in that function.
   This has the addded benefit of system_routing_configure() only being
   called once for that interface by rc.newwanip(v6).
2023-09-12 10:41:17 +02:00
Franco Fichtner
cfff4f2482 interfaces: split IPv4/IPv6 for GRE 2023-09-12 09:52:49 +02:00
Franco Fichtner
315153a07b interfaces: restructure GIF for split IPv4/IPv6 use
Formerly devices like GIF only worked on IPv4 dynamic links,
but with DS-Lite IPv6 is the only dynamic link so split the
execution on dynamic events according to what remote address
the tunnel requires.  This should allow DS-Lite to work out
of the box (functional after bootup).

While here restructure link_interface_to_gif() to better fit
the caller's needs.  Also feeling lucky about the stray
interfaces_bring_up() because if we check if the local address
is there we can be pretty sure the parent device is up.

PR: https://forum.opnsense.org/index.php?topic=35876.0
2023-09-12 09:01:29 +02:00
Qhilm
8d3d648035 Corrected link to IANA DHCPv6 Options documentation 2023-09-11 14:59:00 +02:00
Franco Fichtner
a8c348cfa4 system: cron parameters are escaped properly nowadays
This is allowed nowadays with the proper escaping in the
template employed.  However...

1. The parameter"s" are enforced by doing white-space
separated passing of individiual parts, but that breaks
backend scripts expecting either spaces to be part of
the parmeter or discarding additional parameters.

This matters, because...

2. https://docs.opnsense.org/manual/settingsmenu.html#cron
does not state any two parameter value of interest to
users apart from custom Cron glue.

I'd rather have "parameters" treated as a single first
parameter which can be passed with a %s to the shell, but
I'm unsure if configd will treat it that way?  At least
the crontab part would not be the issue.

Let's test this theory:

  # cat src/opnsense/service/conf/actions.d/actions_test.conf
  [shell]
  command:/bin/csh -c
  parameters:%s
  message:Running %s
  type:script_output
  description:Shell execution (use with care)

  # configctl test shell "echo foo"
  Parameter mismatch

  # configctl test shell "echo\ foo"
  foo

  # configctl test shell "echo\ foo;echo\ bar"
  foo
  bar

So there seems to be a mishandling of spaces in general
which is probably why the parameters are treated as such
in the crontab file.  Perhaps we need to discuss this.
2023-09-11 11:56:08 +02:00
Franco Fichtner
36d250f929 mvc: style 2023-09-11 09:32:46 +02:00
Franco Fichtner
b020480ee7 mvc: fix blankdesc test 2023-09-11 09:19:56 +02:00
Franco Fichtner
e79898bcbd ipsec: pet the translation, remove local/remote to only have one string to translate 2023-09-11 08:38:36 +02:00
Monviech
fcc266107d
VPN/IPSec - Add local_port and remote_port to VPN: IPsec: Connections [new] (#6835) 2023-09-09 22:58:52 +02:00
Franco Fichtner
252870b6c0 dhcp: style 2023-09-08 13:36:08 +02:00
Franco Fichtner
4b69625a4a pluginctl: allow -f mode to drop config properties; closes #6834 2023-09-08 09:26:30 +02:00
Franco Fichtner
b3c3b7a0c2 pluginctl: improve the print behavour for #6834
Now an empty node name '' will stay on the same node allowing to
dump the full config.xml for whatever reason.  Also change the
empty print behaviour to omit the spurious newline as that looks
better.  Last but not least pretty-print JSON for better UX.
2023-09-08 08:06:29 +02:00
Franco Fichtner
ff0b85f7e5 dhcp: clean up the messages in the radvd config header #6819 2023-09-07 20:32:49 +02:00
Franco Fichtner
6fbe6ca189 src: sweep over bootstrap update
Windows line endings...
2023-09-07 16:58:16 +02:00
Franco Fichtner
2e0f00b603 system: style change 2023-09-07 16:55:47 +02:00
Ad Schellevis
dd9854f111 core/css - upgrade bootstrap-select to v1.13.18, remove the version number from the css file as well (needs changes in the plugins as well).
source https://github.com/snapappointments/bootstrap-select/tree/v1.13.18/dist
2023-09-07 15:03:20 +02:00