100 Commits
Author SHA1 Message Date
Franco Fichtner 212185a8be interfaces: for igb vlans it seems they are always up even if the parent is down
PR: https://forum.opnsense.org/index.php?topic=52824.0
2026-10-11 12:05:45 +02:00
Franco Fichtner f681fc26b3 interfaces: defaults for "configurable" and "spoofmac" are ensured in plugins_devices() 2026-10-10 10:34:00 +02:00
Franco Fichtner 180f245170 interfaces: small follow-up regarding 'none' use #10996 2026-10-10 09:24:51 +02:00
Franco Fichtner e57c746ed0 interfaces: only store "dhcp6_norequest_dns" in DHCPv6 mode 2026-10-10 08:40:00 +02:00
Franco Fichtner 099b68a449 interfaces: do not render "none" to configuration #10996 2026-10-10 08:31:36 +02:00
Franco Fichtner 7bbd7a3c4a Revert "mvc: UidField: allow reuse of UID 0 for system scope users"
This reverts commit 649bcb2186.
There is a bug in the old and new behaviour, but without a proper
test case this will not fix easily.  stable/26.7 doesn't use this
yet so it's sane to hotfix.

PR: https://github.com/opnsense/core/issues/10992
2026-10-09 19:43:59 +02:00
Franco Fichtner 2c04169a64 interfaces: better wording
Complaint via: @Monviech
2026-10-09 15:24:49 +02:00
Franco Fichtner 53f03f4e18 interfaces: em does not work as expected, use px 2026-10-09 13:47:58 +02:00
Franco Fichtner 494b0e6c90 interfaces: tweak grid size in assignments 2026-10-09 13:12:55 +02:00
Franco Fichtner 3e63c1cbf8 interfaces: remove the PPP uptime option
Was modified in 4d495ea6cc, f129c4682b et al. to a state where
the option could still be enabled but never read.  The /conf bound historic
log is still filled but nothing reads it.  Let's retire it for 27.1.

One other goal here is to reduce the incoming impact of a MVC/API rewrite.

Discussed with: @swhite2
2026-10-09 13:06:43 +02:00
Franco Fichtner 5aaddb855c interfaces: fix previous 2026-10-09 12:59:19 +02:00
Franco Fichtner 6c6540b233 interfaces: provide better optgroup labels to DeviceField 2026-10-09 12:55:19 +02:00
Franco Fichtner c29bf7f70a interfaces: PPPoEv6 only works with PPPoE device
This was matching all PPP devices which was wrong.
2026-10-09 11:17:10 +02:00
Franco Fichtner abc4c69ce8 interafces: PPPoE supports all IPv6 types
Only IPv4 prohibits use of 'staticv4' and 'dhcp'.  In theory
even these could work but we don't want to push our luck.
2026-10-09 11:08:16 +02:00
Franco Fichtner 28aa52f4e8 interfaces: missed interface designation on configd call 2026-10-09 10:51:49 +02:00
Franco Fichtner e02448173f interfaces: defer PPP to after bootup #10936
This is intended to fix bootup related issues with PPPoE, e.g. where it
retriggers DHCPv6 too many times.  Essentially it's the same as deferring
the newwanip scripts, but one level below since mpd5 is much more allergic
to link state changes.

This also disables the CARP handling on bootup, but does not address
the backup starting up as well as the master.  Essentially this is what
reconfigure_ppp.php is meant for.
2026-10-09 10:23:48 +02:00
Franco Fichtner d2ad94b38b interfaces: introduce interfaces_device_wait() for PPP use 2026-10-09 10:01:11 +02:00
Franco Fichtner 7b9beb8194 Revert "interfaces: the PPP uptime option no longer exists"
This reverts commit b4cca4ef5a.

Meh: apparently all of this works but is never read.
2026-10-09 09:35:31 +02:00
Franco Fichtner b4cca4ef5a interfaces: the PPP uptime option no longer exists
Was removed in 4d495ea6cc, f129c4682b et al.
2026-10-09 09:30:18 +02:00
Franco Fichtner 3384e551f3 interfaces: wait for parent up as well
This needs more work but for now just do what we already do
while wating for the PPP device to come up: wait for the parent
as well as some drivers may take the parent down for multiple
seconds.

Ideally dialing should be deferred to after bootup which we're
already working on... 30 seconds total delay for non-functional
situation is already a lot.

PR: https://forum.opnsense.org/index.php?topic=52824.0
2026-10-09 09:19:38 +02:00
Franco Fichtner 16dfcafee7 interfaces: set promisc mode to advanced 2026-10-08 20:31:47 +02:00
Franco Fichtner 2cf8272b54 interfaces: remove direct $config access and improve device handover in legacy apply 2026-10-07 14:16:33 +02:00
Franco Fichtner b89172f346 interfaces: remove PPTP support; closes #10973
To ease future migrations from PPP to MVC/API and reduce the
config field "localip" misuse we want to phase out PPTP and
reduce complexity of the implementation.

While L2TP may be still around the PPTP tunneling is very likely
not used anymore.  A bit of a message to everyone still using this.
Only one way to find out.
2026-10-07 13:56:34 +02:00
Franco Fichtner 1177021c22 interfaces: backend call for interfaces_ppps_configure(); closes #9352 2026-10-06 15:29:45 +02:00
Franco Fichtner dfc07590e9 interfaces: priv-sep script for interface apply the legacy way #9352 2026-10-06 14:57:48 +02:00
Franco Fichtner 530ee0cee0 interfaces: remove system_routing_configure() #9352
The function is called via $reload hook so adding another
hook makes no sense.  This may have changed since the original
commit below and since we need to priv-sep these calls the
easiest way is to remove it.  ;)

See also: https://github.com/pfsense/pfsense/commit/8e11b23f541d
2026-10-06 14:35:31 +02:00
Franco Fichtner f76beb8ff0 system: $config is unused in core.inc 2026-10-06 14:23:30 +02:00
Franco Fichtner 1f96bd4f6f interfaces: move legacy apply to /var/lib/php/tmp for #9352 2026-10-06 14:20:03 +02:00
Franco Fichtner 6dcc04a243 firewall: less parenthesis for previous 2026-10-06 13:07:07 +02:00
Franco Fichtner 1a9e4794a0 src: style sweep 2026-10-06 09:09:56 +02:00
Franco Fichtner ff90e9c9ec system: refactor route deletion and use priv-sep in general settings page #9352 (#10962) 2026-10-06 09:01:13 +02:00
Franco Fichtner 63c8df0337 system: make "noroot" the standard option with 27.1 #9352
As discussed internally, we want to aim for this to be the new standard,
but we will not migrate any existing setups just yet.  This may need more
documentation/annotation for components (mostly legacy plugins) where this
won't work, but it's a very good start to root these out via user reports.
2026-10-06 08:46:40 +02:00
Franco Fichtner 609cc79992 mvc: also fix overrides of reconfigureForceRestart() regarding return type 2026-10-06 08:37:27 +02:00
Franco Fichtner 7a4294f20f interfaces: add proper local/remote IP support to PPPoE IPCP; closes #10966
I added the remotenet field specifically so that we can do a remote IP /32
selection for people with HA issues getting the wrong gateway from the ISP.
2026-10-05 17:20:47 +02:00
Franco Fichtner 92974f0802 mvc: trailing commas are cool so let's keep them 2026-10-03 15:32:49 +02:00
Franco Fichtner ebed60e243 mvc: PortField: always return a string for normalizedPort() 2026-10-03 15:18:53 +02:00
Franco Fichtner 0405ed0f2e mvc: do not force strict compare on any 2026-10-03 15:10:49 +02:00
Franco Fichtner 7647838324 system: reword previous 2026-10-03 15:05:20 +02:00
Franco Fichtner 6c03b3170d make: sorting found files makes more sense 2026-10-03 07:38:15 +02:00
Franco Fichtner fa31068e35 interfaces: clean up after previous 2026-10-01 21:16:35 +02:00
Franco Fichtner ea58b68b8e interfaces: be more conservative with -no_dad #10951
In e0e1401f87 we're enabling it always which also affects
assigned tunnels such as WireGuard which tend to avoid wanting
DAD so make room for leaving the flag unchanged and change it
everywhere else explicitly per type.
2026-10-01 21:06:25 +02:00
Franco Fichtner 256d2784d4 interfaces: spurious return statement in interfaces_wlan_configure() 2026-10-01 13:31:50 +02:00
Franco Fichtner c3100684f8 interfaces: add a new 'updateip' hook
'newwanip' is misused sometimes and never called in static configurations.
The only consumer is the RFC2136 plugin but maybe that changes in the
future.  The plugin also listens on "bootup" and "local" so simply making
a global event for use at the spots where it exists is enough.
2026-10-01 11:06:23 +02:00
Franco Fichtner 397ee8a9b2 make: repair full file matching introduced a while back 2026-10-01 09:53:31 +02:00
Franco Fichtner d7d7076afe mvc: dispatch failed message during reconfiguredAction()
We lose the stop result in start/reload case but it's not
missing critical.

Suggested by: @Monviech
2026-09-30 15:29:40 +02:00
Franco Fichtner 4311c5a3b3 system: installer as a real user on demand (#10888)
This allows the installer to use authenticated integration
and SSH keys as a full root user overlay.
2026-09-29 10:34:54 +02:00
Franco Fichtner 97e503079c system: switch password hashing from bcrypt to argon2id
A bit unfortunate both spots exist, but maybe that can change later on.
2026-09-29 10:32:13 +02:00
Franco Fichtner c4ebe6d086 system: add webgui PAM config to test with opnsense-login 2026-09-29 10:11:37 +02:00
Franco Fichtner a2aeeaf554 system: add latency_avg as sanity check for running dpinger; closes #10937
The check was introduced in 0df1c0d so there's no technical background
to take into account.  Indeed, latency_avg is probably the reading that
would least likely be 0 in this case.

Suggested by: @mbccd
2026-09-29 09:51:16 +02:00
Franco Fichtner 7441cc3811 interfaces: make a note for some post-merge work still not done 2026-09-28 13:49:41 +02:00
Franco Fichtner 70c5c92263 interfaces: use batch reload in apply_pending_if_changes.php
This approach may be useful for rc.linkup as well.  We basically
have all the code we need except for proper locking.
2026-09-25 10:57:38 +02:00
Franco Fichtner d35bdb095e interfaces: use 1d92dcda2 to customize the settings-changed trigger
This is not the final form, but it keeps the special page logic
contained herein while still being able to use the generic trigger.
2026-09-25 10:08:27 +02:00
Franco Fichtner 21923995f1 interfaces: save fields that don't matter to operation directly
This ignores the fields from the compare.  There's still an issue
with the banner showing the apply message when no apply is needed
(and no todo file is added).  This needs to be fixed in the UI,
but needs more glue first.
2026-09-24 15:14:27 +02:00
Franco Fichtner 7e5c2887aa interfaces: compare first, then call the real toLegacy() when needed
Saves a few cycles after we have to pull the data twice.
2026-09-24 15:14:27 +02:00
Franco Fichtner 8de365a559 interfaces: make toLegacy() return the real legacy config
Addresses the workaround of 17bc925651 which makes the resulting
code a bit more condensed and failsafe.
2026-09-24 15:14:27 +02:00
Franco Fichtner 8efb2fa645 interfaces: sync all configration before running configure loop
dhcpv6 depends on WAN<->LAN relationships which need a sync of
the whole interface config first.

While here enable output for diagnostic purposes when running
the script from the shell.
2026-09-24 10:06:11 +02:00
Franco Fichtner c97158614b interfaces: fix mismatch on change with disablevlanhwfilter
Caused all interfaces to be queued for apply.
2026-09-24 10:02:36 +02:00
Franco Fichtner 17bc925651 interfaces: offload $legacybools and $legacyempties to NetworkInterface model; closes #10918
So we can fix the mocked $config apply in apply_pending_if_changes.php.
Ideally, toLegacy() should already do this and we just replace the whole
interface section in the script.
2026-09-24 09:33:46 +02:00
Franco Fichtner 08f81a1a2f interfaces: uppercase for clarity 2026-09-23 14:37:46 +02:00
Franco Fichtner b58fcd2a1e firewall: also add [legacy] annotation to outbound menu item 2026-09-23 10:16:26 +02:00
Franco Fichtner 61a728b608 firewall: remove legacy ACL definitions no longer relevant to core 2026-09-23 10:09:39 +02:00
Franco Fichtner d6c238f695 firewall: always show outbound if plugin present 2026-09-23 10:03:11 +02:00
Franco Fichtner cd3b5670ae firewall: outbound NAT moves to legacy plugin
Rules still work, but not visible from DNAT.  Migration assistant
will know that these still exist.  Will be documented a bit but
low risk move in general.
2026-09-23 09:55:45 +02:00
Franco Fichtner b837f60234 interfaces: dhclient handles keywords case-insensitive so properly match all 'media' invokes
Reported by: @Alice-Sabrina-Ivy
2026-09-22 08:36:44 +02:00
Franco Fichtner c2bbd69954 system: clear password change session flag only after password was changed
PR: GHSA-x3q7-cc7h-gj3v
2026-09-22 07:52:14 +02:00
Franco Fichtner 4e03c6ea43 ui: remove defunct content-box-main usage
So that reintroducing content-box-main style will not taint these
pages which are likely ok as is nowadays.

PR: https://github.com/opnsense/core/pull/10375
2026-09-21 13:52:21 +02:00
Franco Fichtner f94982b688 system: revert latest service widget changes
As discussed internally there are no more complaints and this makes
it a bit harder to see the status at first glance, especially for the
color blind.  Let's try to not tempt fate any more than we already
have on the subject.

This reverts commit f2815fabed.
This reverts commit 73e154151b.
2026-09-21 12:37:11 +02:00
Franco Fichtner 67a0184458 interfaces: retire these problematic validations
ISC DHCP is no longer installed by default and mostly not installed
on newer installations.  However, people tend to use older backups
and the server may be enabled still.  The alternative would be to
add a plugin check, but I don't really see the point in dragging this
on.

PR: https://forum.opnsense.org/index.php?topic=48181.0
2026-09-20 20:48:26 +02:00
Franco Fichtner f7cb455908 firewall: fix service restart with id set; closes #10905
Likely originates from d737ff9cb3.

Suggested by: @aeble
2026-09-20 20:16:16 +02:00
Franco Fichtner 67c49d2e89 interfaces: fix linter complaints in WLAN model, 11a typo and wpa_pairwise labels 2026-09-19 16:23:26 +02:00
Franco Fichtner dc7b058b8d interfaces: fix a model lint complaint 2026-09-19 16:21:24 +02:00
Franco Fichtner 227bbd3d12 interfaces: fix PHP warnings and do not write unset ones
Pertains to interafces.php mostly but let's fix this so we
can see if the new interface settings work the same.
2026-09-19 08:57:47 +02:00
Franco Fichtner 4fe0a5e9df system: style sweep 2026-09-18 15:42:53 +02:00
Franco Fichtner 28f5377448 interfaces: adjust message to sound similar to the old 2026-09-18 13:52:06 +02:00
Franco Fichtner 69f3d1299b interfaces: second half of previous 2026-09-18 13:41:33 +02:00
Franco Fichtner dfb019d9ab interafces: add pending action to make the apply banner persistent
This allows to emulate the old GUI's banner, but in a more modern way.
2026-09-18 13:38:16 +02:00
Franco Fichtner 857b29009b interfaces: retain empty fields also written by legacy GUI 2026-09-18 13:25:24 +02:00
Franco Fichtner 320f8b67dc interfaces: a bit more fiddling with current defaults 2026-09-18 13:13:10 +02:00
Franco Fichtner b785e5e8cd config: add descr to interface defaults since that is what legacy page does 2026-09-18 13:08:26 +02:00
Franco Fichtner 6d9eb1f04e interfaces: remove spurious default too 2026-09-18 13:02:02 +02:00
Franco Fichtner abb50eaaef interfaces: requiring dhcp6-ia-pd-len will punch it into LAN config, too
While here add some style and proper parenthesis.
2026-09-18 12:53:46 +02:00
Franco Fichtner 3fad5a0504 interfaces: handle these as well
They are correct but it doesn't hurt to keep them in the list
to avoid noise in the config diff for now.  It's easier to
spot actual issues such as "<dhcp6-ia-pd-len>0</dhcp6-ia-pd-len>"
being written to a LAN configuration.
2026-09-18 12:39:43 +02:00
Franco Fichtner 2f2d9892a0 interfaces: another one for previous 2026-09-18 12:37:49 +02:00
Franco Fichtner d6a1f0118c interfaces: handle legacy booleans for #10881 2026-09-18 12:34:41 +02:00
Franco Fichtner dc5fdc67f0 dhcrelay: in hindsight shared ACL is better 2026-09-17 14:19:24 +02:00
Franco Fichtner 866926fa09 firmware: add simple prompt to console changelog viewer; closes #10889
Suggested-by: @davidemyers
2026-09-17 13:46:46 +02:00
Franco Fichtner fd6e57276b plugins: add error returns to plugins_configure()
These are not really errors.  They indicate a possible issue
but should not error.  An unknown hook may be normal given
that the plugin owning the hook is not installed.

We also don't consider hooks to return errors in a meaningful
way as they are meant as machinery to run a reconfiguration
which can register its own errors elsewhere in the system.

But this can give the user running manual queries a useful hint.
2026-09-17 10:08:40 +02:00
Franco Fichtner fcc089b4ab interfaces: remove stray loopback queue introduced in 1f34fdeb68
The original idea was to have a separate loopback queue but that
does not seem necessary.  Remove the assignment again, because
otherwise the queue would be implicity late and not early as before.
2026-09-14 09:31:27 +02:00
Franco Fichtner ee367f5a73 interfaces: fix API ACL patters for GIF/GRE; closes #10871 2026-09-13 20:11:38 +02:00
Franco Fichtner e83acb57f8 interfaces: make sure to set default IPv6 on lo0 as well #10866 2026-09-13 13:21:20 +02:00
Franco Fichtner 8319762dfe interfaces: add interfaces_vlan_match() to avoid future mistakes 2026-09-13 12:15:04 +02:00
Franco Fichtner 90fba3d4db interfaces: minor flow tweak on intefaces_ppps_hardware() 2026-09-13 11:59:50 +02:00
Franco Fichtner 0b8c7c0baa firewall: remove handling looback addresses as "private"
Loopbacks are not "private" in the traditional sense and will be handled
by bogons in the near future to more closely align with the upstream bogon
source.
2026-09-13 10:52:32 +02:00
Franco Fichtner 817f670cff interfaces: style 2026-09-10 13:31:47 +02:00
Franco Fichtner a41cc16182 openvpn: remove legacy carp hook 2026-09-10 13:12:35 +02:00
Franco Fichtner 6adbfd19be interfaces: fix wlan mode access for most spots
The model will allow us to access the default even if it
is not set yet.  Just one old spot remains.
2026-09-10 11:47:44 +02:00
Franco Fichtner aad415fa33 interfaces: bring back wireless status page 2026-09-10 10:55:06 +02:00
Franco Fichtner 7cd941d20c interfaces: bring WLAN and MPD5 loading/reset points closer together
Largely these fill the same need: we run a daemon on that interface
(or a daemon that will create the software interface).  Since WLAN
clones are created and reloaded earlier we are not bound to a random
place in the configure function and can eventually add a plugin hook
for this if it makes sense.

While here push the $linkup workaround down and add a comment on
why it is still needed.  It would be nicer not having it but the
situation is pretty tough if the historic situation did not change.
2026-09-09 21:44:48 +02:00
Franco Fichtner 593004be7e interfaces: interfaces_wlan_clone() is already plugged
This means we call it during device creation and reloading, which
means we can remove it from interafaces_wlan_configure() so it loses
another side effect.  Just needs the reconfigure script to run the
full configuration loop then.

While here unify the function syntax to interfaces_wlan_*().
2026-09-09 21:23:56 +02:00
Franco Fichtner 7fb3708e9e interfaces: whitespace 2026-09-09 21:08:55 +02:00