Commit graph

488 commits

Author SHA1 Message Date
Franco Fichtner
1e1a6a37f6 make: pretty up previous, use tools.git wording 2026-01-28 22:27:07 +01:00
Franco Fichtner
ef49026664 make: make this easier (and safer) for users 2026-01-27 11:10:16 +01:00
Franco Fichtner
ac2fc5a597 pkg: the script has the benefit of testing at the moment
pluginctl reaches into webgui.inc but the firmware and configd
use rc.restart_webgui which we want to hook into for now.
2026-01-15 08:47:48 +01:00
Franco Fichtner
23589f1643 isc-dhcp: remove main files for #9155
It will probably take more time to remove the loose ends but this
is the working bulk state for the pluginification.
2026-01-14 13:45:55 +01:00
Franco Fichtner
b7af57327c make: happy new year!
Most of the glue in Makefile belongs to version nowadays, but we
haven't moved the barely moving parts yet.  Start with the copyright
block since we're touching it now for the obvious reason.
2026-01-01 10:45:05 +01:00
Franco Fichtner
972433b4d0 make: allow test to be run always
I think the install dependencies were removed.  At least when patching
the local installation the tests do not care suggesting they use the
proper repository files for testing.
2025-12-09 14:24:01 +01:00
Franco Fichtner
fdf52dce8e tests: unwind BaseModel test side effect on AclConfig
Give the test its own empty config to migrate into, which makes
resetting it irrelevant.  A tiny bit of magic is needed to bootstrap
a config.xml so it's not the one that is checked in and we also
remove the temporary files from the tree so it does not confuse git.

save() is a far-reaching side effect in the test, but more or less
necessary for better test coverage.  But I'd still want a simpler
test around Core\Config and this offers merely offers the groundwork
also removing the need to reset this from make commands.
2025-12-05 11:04:59 +01:00
Ad Schellevis
61663d0858
Interfaces: Neighbors: Automatic Discovery - add new hostdiscovery feature (#9354)
* Interfaces: Neighbors: Automatic Discovery - add new hostdiscovery feature

This splits the Neighbors menu item in an existing static assignments and adds the automatic discovery feature which includes logging and insights into the currently known hosts on the network. When automatic discovery is disabled, it drops back to arp/ndp.

By default automatic mode is enabled on all interfaces, but configuration options exists (to limit interfaces and networks).

Other consumers which require host mappings can use the /usr/local/opnsense/scripts/interfaces/list_hosts.py  script to either fetch the sqlite database or arp/ndp data for the selected pprotocol(s).

More information about the hostwatch daemon is available at https://github.com/opnsense/hostwatch

* Interfaces: Neighbors: Automatic Discovery - add new hostdiscovery feature (review feedback https://github.com/opnsense/core/pull/9354)

* Interfaces: Neighbors: Automatic Discovery - change list_hosts.py to only query ndp when explicitly asked.

Due to the short timeouts of the ndp entries and the cost of querying them, it's probably best to only support ndp when explicitly asked.
In most cases where we need host data, we currently only support ipv4 anyway, which means a switch to the new entrypoint (list_hosts.py script) should be relatively harmless.

* Interfaces: Neighbors: Automatic Discovery - add new hostdiscovery feature (review feedback https://github.com/opnsense/core/pull/9354)
2025-11-06 13:01:52 +01:00
Franco Fichtner
edc11581b7 make: do not rely on git to reset the file
The approach works but creates an error using the tools.git
"make test" target.  It would be nicer to not operate on the
actual config.xml that is checked in, but that's something
for later as tests need more of their own path use (and tmp
directory).
2025-10-29 08:33:14 +01:00
Franco Fichtner
92f4ffd013 make: pull all stable branches 2025-10-23 17:58:47 +02:00
Franco Fichtner
8c72baef23 make: extra mile on pluginctl calls 2025-09-16 07:33:39 +02:00
Franco Fichtner
6cd1ef3e2e system: add pluginctl -m and -v to save on typing #9213 2025-09-15 15:33:56 +02:00
Franco Fichtner
fdb29ee9ca interfaces: for previous #9187 2025-09-09 13:24:25 +02:00
Franco Fichtner
5afb8b8a32 make: only run pluginctl in a running system 2025-08-21 09:06:00 +02:00
Franco Fichtner
cda8e38c67 system: add pluginctl hook for cache_flush 2025-08-21 08:37:42 +02:00
Franco Fichtner
6f92c13618 make: this was useful but is now wrong, bring it back in a better form 2025-08-20 16:02:14 +02:00
Franco Fichtner
52bae91d5a make: more ordering issues after reordering 2025-08-01 09:09:39 +02:00
Franco Fichtner
2e06ef8473 make: remove unneeded .PHONY 2025-08-01 09:00:21 +02:00
Franco Fichtner
8968b3c53a mkae: this works now since we don't use != assignments 2025-08-01 08:56:43 +02:00
Franco Fichtner
a7ee273d68 make: don't taint common with these directories
While they are common they are needed for stand-alone support so
plugins.git will define them as well.

Slightly mod the test target for future reuse.  Avoid plain "git" use.
2025-08-01 08:52:20 +02:00
Franco Fichtner
67b9c055bb make: path and tag awareness for some git targets 2025-07-30 09:18:36 +02:00
Franco Fichtner
3769fb59c7 make: move clean glue to common 2025-07-29 21:12:25 +02:00
Franco Fichtner
3cfad49ad7 make: add a little common stub and adjust for style/sweep via plugins 2025-07-29 15:09:09 +02:00
Franco Fichtner
ae63623233 system: better wwwonly bootstrap
This also has an issue with the post-update rc.syshook if
the wwwonly is not found.  But: after a boot it is ensured
and should not be missing thereafter.

The package post-install would ensure it previously, but
we don't want to also chain the php bootstrap through this
just to get the call stack in the right order.

May need further adjusting but also no need to rush this
into a stable release at the moment.
2025-07-29 13:16:04 +02:00
Franco Fichtner
f2b8e5cab6 make: style and sweep stuff too 2025-07-29 10:57:09 +02:00
Franco Fichtner
817add90d6 make: move git glue 2025-07-29 10:39:29 +02:00
Franco Fichtner
1212cc33ec make: reshuffle lint stuff for plugin reuse 2025-07-29 09:24:26 +02:00
Franco Fichtner
c001166e75 make: move lint targets to separate file for easier plugins inclusion 2025-07-29 08:28:36 +02:00
Franco Fichtner
81e8c7dd43 firmware: allow replacements to be read at runtime
This is mainly for consumption in opnsense-patch to address a weakness
patching .in files.  Not my favourite way of duplicating things in
VERSIONFILE but it is the most direct way to access information we do
not have at runtime.  Adding another file just for this seems silly.
2025-07-18 09:08:57 +02:00
Ad Schellevis
a754a9243a Firewall: Aliases - add Expire option to external aliases to automatically cleanup tables via cron, closes https://github.com/opnsense/core/issues/8831
As expiretable was already used for predefined sshlockout and virusprot tables, we moved the option to the model and made sure the internal ones have their settings in the model as well.
For simplicity, we flush the tables that need to be expired to cron, using either a 15 minute or 1 minute interval, depending on timing.

pfctl offers the same functionality as expiretable now, so lets drop the latter for simplicity.
2025-07-03 18:42:56 +02:00
Franco Fichtner
bb5e03a3e3 mvc: new base class for separator/list based fields #8897 2025-07-02 16:23:45 +02:00
Franco Fichtner
61be61ed10 mvc: style sweep for asList -> AsList 2025-07-02 09:53:01 +02:00
Franco Fichtner
ba368165cd pkg: replace wwwonly user/group information #8824
Reduce exposure by injecting the information to package
and recover scripts.
2025-06-25 13:25:00 +02:00
Franco Fichtner
497df83922 pkg: test-drive cmp -s as suggested by @0xabu 2025-06-13 09:19:35 +02:00
Franco Fichtner
ad640cbbde pkg: to complicate matters we need to register and restore user/group through package means 2025-06-12 11:01:32 +02:00
Franco Fichtner
58137dfa09 pkg: remove this ancient rule of avoiding map files 2025-05-06 17:09:14 +02:00
Ad Schellevis
c7c0785e09 Firewall: Aliases - support jq for alias processing, closes https://github.com/opnsense/core/issues/8277
As we already supported a dot [.] terminated format, we should support both advanced queries as simple ones using "container1.container2", by prefixing the simple format with a dot, we can offer both options using the same parser.

While comparing jq with jsonpath, the first option seems to be most practical and easier to explain.
2025-03-12 20:39:51 +01:00
Franco Fichtner
d77bd0a8fb system: remove GDrive backup from core
Still needs migration glue, but mechanics are done.

PR: https://github.com/opnsense/core/issues/8343
2025-03-12 08:11:25 +01:00
Franco Fichtner
d68d48fdd4 make: add a 'pull' target 2025-03-10 08:57:52 +01:00
Franco Fichtner
13b68dde51 make: clear all files from work/ dir when mfc'ing 2025-03-10 08:53:03 +01:00
Franco Fichtner
031ca59591 make: clean up after tests so I don't have to
It has the downside of losing changes to config.xml but
we are far more likely to run the tests than to change
the file.  Ideally, the UUIDs should not shift.
2025-01-09 08:08:57 +01:00
Franco Fichtner
dd3a47ca34 pkg: it's 2025 :D 2025-01-08 13:15:00 +01:00
Franco Fichtner
7f62439e7b make: move to better spot 2024-12-19 17:30:49 +01:00
Franco Fichtner
9176999f7f make: add "glint" target ;) 2024-12-19 17:27:35 +01:00
Franco Fichtner
a0b4e35ea4 make: restyle 2024-10-13 14:18:05 +02:00
Ad Schellevis
84437b3812 mvc - rename PHPunit.xml to phpunit.xml so phpunit will pick it up automatically. 2024-10-12 17:10:17 +02:00
Franco Fichtner
ff73ec9c90 make: do not waste development time by clearing caches on install 2024-09-30 09:26:37 +02:00
Franco Fichtner
a27d3313eb pkg: sort ;) 2024-09-26 09:39:02 +02:00
Ad Schellevis
ebb407e997 System: Trust - add dependency for crl_fetch.py 2024-09-26 09:29:34 +02:00
Franco Fichtner
c02aabc109 make: add lint-acl and finish first script iteration #7821 2024-09-13 09:25:46 +02:00