OPNSense/plugins 3f4beb9www/caddy/src/opnsense/mvc/app/controllers/OPNsense/Caddy/forms general.xml, www/caddy/src/opnsense/mvc/app/models/OPNsense/Caddy Caddy.xml

www/caddy: Fix reload/stop of caddy being infinite when websocket streams of clients are open (#3934)

DeltaFile
+8-1www/caddy/src/opnsense/mvc/app/models/OPNsense/Caddy/Caddy.xml
+7-0www/caddy/src/opnsense/mvc/app/controllers/OPNsense/Caddy/forms/general.xml
+5-0www/caddy/src/opnsense/service/templates/OPNsense/Caddy/Caddyfile
+20-13 files

OPNSense/plugins 2ec0eefwww/caddy/src/opnsense/mvc/app/controllers/OPNsense/Caddy/Api ReverseProxyController.php, www/caddy/src/opnsense/mvc/app/views/OPNsense/Caddy reverse_proxy.volt

www/caddy: Selectpicker that can filter the Domain, Subdomain and Handlers by selected Domain (#3937)

* Update reverse_proxy.volt

Add a first version of a filter functionality by domain. In this version, only handlers are filtered by domain.

A selectpicker with multi selection can choose domains, and the filter function compares these UUIDs to the UUIDs of the "reverse" UUIDs of the model relation fields. Either all domains are shown, or only elements where the UUIDs match.

* Update ReverseProxyController.php

A new api endpoint for the domain search selectpicker has been created. It returns the ID and a Domain+Port combination.

The search function for the Handler now returns all fields if no filter has been set, or only the referenced UUIDs when a filter has been set.

* Update ReverseProxyController.php - Add search function to subdomains

* Update reverse_proxy.volt - Reference Search Filter in Handlers, Domains and Subdomains

* Update ReverseProxyController.php - Add the search function to domains

    [9 lines not shown]
DeltaFile
+89-0www/caddy/src/opnsense/mvc/app/views/OPNsense/Caddy/reverse_proxy.volt
+73-10www/caddy/src/opnsense/mvc/app/controllers/OPNsense/Caddy/Api/ReverseProxyController.php
+162-102 files

OPNSense/plugins 8ec93bdwww/caddy/src/opnsense/mvc/app/controllers/OPNsense/Caddy/forms logsettings.xml, www/caddy/src/opnsense/mvc/app/models/OPNsense/Caddy Caddy.xml

www/caddy: Select global log level (#3941)

DeltaFile
+10-0www/caddy/src/opnsense/mvc/app/models/OPNsense/Caddy/Caddy.xml
+6-0www/caddy/src/opnsense/mvc/app/controllers/OPNsense/Caddy/forms/logsettings.xml
+3-0www/caddy/src/opnsense/service/templates/OPNsense/Caddy/Caddyfile
+19-03 files

OPNSense/plugins de94c64www/caddy pkg-descr Makefile

www/caddy: v1.5.5 changelog (#3938)

DeltaFile
+7-0www/caddy/pkg-descr
+1-2www/caddy/Makefile
+8-22 files

OPNSense/plugins 3a559f9www/caddy/src/opnsense/scripts/OPNsense/Caddy caddy_control.py

Update caddy_control.py (#3944)

Forces the reload even if the config in the Caddyfile is unchanged, using an extra command of the rc.d script, forcing certificates in the filesystem to reload.

Fixes: {"info","ts":"2024-04-26T06:13:06Z","msg":"config is unchanged"}

Otherwise, if the config is unchanged, and the certificates are replaced, the names of the certificates in the Caddyfile stay the same, thus implying the config has been unchanged.
DeltaFile
+1-1www/caddy/src/opnsense/scripts/OPNsense/Caddy/caddy_control.py
+1-11 files

OPNSense/plugins 666662fnet-mgmt/telegraf pkg-descr Makefile, net-mgmt/telegraf/src/opnsense/mvc/app/controllers/OPNsense/Telegraf/forms output.xml

net-mgmt/telegraf (#3777)

DeltaFile
+34-0net-mgmt/telegraf/src/opnsense/mvc/app/controllers/OPNsense/Telegraf/forms/output.xml
+23-0net-mgmt/telegraf/src/opnsense/mvc/app/models/OPNsense/Telegraf/Output.xml
+18-0net-mgmt/telegraf/src/opnsense/service/templates/OPNsense/Telegraf/telegraf.conf
+4-0net-mgmt/telegraf/pkg-descr
+1-1net-mgmt/telegraf/Makefile
+80-15 files

OPNSense/core dd46067src/opnsense/mvc/app/models/OPNsense/Firewall Filter.php, src/opnsense/mvc/app/models/OPNsense/Firewall/Migrations MFP1_0_4.php

mvc: style sweep
DeltaFile
+1-1src/opnsense/mvc/app/models/OPNsense/Firewall/Filter.php
+1-1src/opnsense/mvc/app/models/OPNsense/Firewall/Migrations/MFP1_0_4.php
+2-22 files

OPNSense/core 4489190. plist

plist
DeltaFile
+4-2plist
+4-21 files

OPNSense/core cd81bccsrc/opnsense/mvc/app/controllers/OPNsense/Firewall/Api OneToOneController.php, src/opnsense/mvc/app/controllers/OPNsense/Firewall/forms dialogOneToOneRule.xml

Firewall: NAT: One-to-One - refactor to MVC, closes https://github.com/opnsense/core/issues/7250
DeltaFile
+0-475src/www/firewall_nat_1to1_edit.php
+0-410src/www/firewall_nat_1to1.php
+107-0src/opnsense/mvc/app/models/OPNsense/Firewall/Migrations/MFP1_0_4.php
+81-0src/opnsense/mvc/app/controllers/OPNsense/Firewall/forms/dialogOneToOneRule.xml
+71-1src/opnsense/mvc/app/models/OPNsense/Firewall/Filter.xml
+67-0src/opnsense/mvc/app/controllers/OPNsense/Firewall/Api/OneToOneController.php
+326-8868 files not shown
+439-90714 files

OPNSense/core 6f24db1src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes ContainerField.php

mvc/model/ContainerField - pass isFieldChanged() to children.

Noticed this issue while working on filter validations, which seemed to re-validate each item on every migration due to FieldTypes inheriting from ContainerField.
This is a minor change, but will prevent record validations from triggering unnecessary.
DeltaFile
+12-0src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/ContainerField.php
+12-01 files

OPNSense/src 8160372sys/kern kern_timeout.c

Set pin_default_swi to 0 by default
DeltaFile
+1-1sys/kern/kern_timeout.c
+1-11 files

OPNSense/src d54a1c8sys/net rss_config.c if_gre.c, sys/netinet ip_input.c

rss: add sysctl enable toggle

This commit also includes the original refactoring changes

This change allows the kernel to operate with the default netisr cpu-affinity settings while having RSS compiled in. Normally, RSS changes quite a bit of the behaviour of the kernel dispatch service - this change allows for reducing impact on incompatible hardware while preserving the option to boost throughput speeds based on packet flow CPU affinity.

Make sure to compile the following options in the kernel:

    options  RSS
    options  PCBGROUP

As well as setting the following sysctls:

    net.inet.rss.enabled: 1
    net.isr.bindthreads: 1
    net.isr.maxthreads: -1 (automatically sets it to the number of CPUs)

And optionally (to force a 1:1 mapping between CPUs and buckets):


    [4 lines not shown]
DeltaFile
+37-1sys/net/rss_config.c
+20-0sys/netinet6/ip6_input.c
+12-7sys/net/if_gre.c
+19-0sys/netinet/ip_input.c
+7-0sys/netinet6/frag6.c
+6-0sys/netinet6/ip6_output.c
+101-810 files not shown
+130-916 files

OPNSense/core 697992bsrc/opnsense/mvc/app/models/OPNsense/Base/FieldTypes NetworkAliasField.php

mvc/model - implement getDescription() in NetworkAliasField. As this field type acts as a single (non-list) type, we need to return the description from here as well as BaseListField's implementation doesn't apply here.
DeltaFile
+12-0src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/NetworkAliasField.php
+12-01 files

OPNSense/core b139e33src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes BaseListField.php

mvc/model - BaseListField replace array_map+strval for loop with cast to preserve execution time. The mapping with strval seems to be rather slow, a simple cast seems to be roughly 4 times faster.
DeltaFile
+5-2src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/BaseListField.php
+5-21 files

OPNSense/core f652640src/opnsense/www api.php

MVC: deal with explicit buffering on Phalcon side

The start() and finish() methods in Phalcon start and close an output buffer respectively. If we clear this buffer prematurely, as is needed for streaming data, we must handle the exception that pops up as a result of Phalcon trying to close the buffer again. In cases where such control over the output is needed, we must also assume that the headers have already been sent, so silence the output in this case to prevent a PHP fatal error.
DeltaFile
+11-1src/opnsense/www/api.php
+11-11 files

OPNSense/src 678a1afsys/netinet ip_output.c ip_fastfwd.c, sys/netinet6 ip6_output.c ip6_fastfwd.c

pf|ipfw|netinet6?: shared IP forwarding

This removes the if_output calls in the pf(4) code that escape further
processing by defering the forwarding execution to the network stack
using on/off style sysctls for both IPv4 and IPv6.

Also see: https://reviews.freebsd.org/D8877
DeltaFile
+136-12sys/netinet6/ip6_output.c
+107-9sys/netinet/ip_output.c
+30-46sys/netinet6/ip6_fastfwd.c
+28-46sys/netpfil/ipfw/ip_fw_pfil.c
+34-29sys/netinet6/ip6_forward.c
+25-34sys/netinet/ip_fastfwd.c
+360-1766 files not shown
+439-22912 files

OPNSense/core 50bd3dcsrc/opnsense/mvc/app/library/OPNsense/Trust Store.php

Trust: swapped issuer and subject in parseX509(), closes https://github.com/opnsense/core/issues/7389
DeltaFile
+2-2src/opnsense/mvc/app/library/OPNsense/Trust/Store.php
+2-21 files

OPNSense/src 82d5531sys/netinet ip_output.c ip_fastfwd.c, sys/netinet6 ip6_output.c ip6_fastfwd.c

pf|ipfw|netinet6?: shared IP forwarding

This removes the if_output calls in the pf(4) code that escape further
processing by defering the forwarding execution to the network stack
using on/off style sysctls for both IPv4 and IPv6.

Also see: https://reviews.freebsd.org/D8877
DeltaFile
+136-12sys/netinet6/ip6_output.c
+107-9sys/netinet/ip_output.c
+30-46sys/netinet6/ip6_fastfwd.c
+28-46sys/netpfil/ipfw/ip_fw_pfil.c
+34-29sys/netinet6/ip6_forward.c
+25-34sys/netinet/ip_fastfwd.c
+360-1766 files not shown
+439-22912 files

OPNSense/src f94dd9csys/dev/ixgbe ixgbe_phy.c if_ix.c

sys/dev/ixgbe - workaround to prevent an i2c bus read to keep trying to read an empty slot.

When executing `ifconfig -v` this will lead to stalls for a second per interface due to the timeout being set to a static 10 without a module placed, this patch makes sure this is only allowed once per insertion.
DeltaFile
+12-0sys/dev/ixgbe/ixgbe_phy.c
+5-0sys/dev/ixgbe/if_ix.c
+2-0sys/dev/ixgbe/ixgbe_type.h
+19-03 files

OPNSense/src 09b6c63sys/dev/axgbe xgbe-phy-v2.c xgbe-sysctl.c

axgbe: remove old annotations and a bit of whitespace cleanup
DeltaFile
+8-8sys/dev/axgbe/xgbe-phy-v2.c
+2-2sys/dev/axgbe/xgbe-sysctl.c
+1-1sys/dev/axgbe/if_axgbe_pci.c
+1-1sys/dev/axgbe/xgbe-dev.c
+12-124 files

OPNSense/src 3b27b51share/man/man4 wg.4, sys/dev/wg if_wg.c

wg: Add netmap support

When in netmap (emulated) mode, wireguard interfaces prepend or strip a
dummy ethernet header when interfacing with netmap.  The netmap
application thus sees unencrypted, de-encapsulated frames with a fixed
header.

In this mode, netmap hooks the if_input and if_transmit routines of the
ifnet.  Packets from the host TX ring are handled by wg_if_input(),
which simply hands them to the netisr layer; packets which would
otherwise be tunneled are intercepted in wg_output() and placed in the
host RX ring.

The "physical" TX ring is processed by wg_transmit(), which behaves
identically to wg_output() when netmap is not enabled, and packets
appear in the "physical" RX ring by hooking wg_deliver_in().

Reviewed by:    vmaffione
MFC after:      1 month

    [3 lines not shown]
DeltaFile
+149-6sys/dev/wg/if_wg.c
+14-0share/man/man4/wg.4
+163-62 files

OPNSense/src d4b875e.github CODEOWNERS, .github/ISSUE_TEMPLATE bug_report.md

github: sync our issue template and remove FreeBSD stuff
DeltaFile
+0-105.github/CODEOWNERS
+0-66.github/workflows/cross-bootstrap-tools.yml
+55-0.github/ISSUE_TEMPLATE/bug_report.md
+0-16.github/PULL_REQUEST_TEMPLATE/pull_request_template.md
+55-1874 files

OPNSense/src 9181896stand/efi/loader main.c bootinfo.c

stand: add EFI support for mmio serial consoles

When no legacy serial is found, we may be looking at a non-legacy mmio
serial device mapping, in which case the efi_devpath_name() for name
ConOutDev looks like this:

    VenHw(XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX,0090DCFE00000000)/Uart(115200,8,N,1)/VenVt100()

Which should tell the kernel to attach a console to 0xfedc9000
(little endian 64 bit value).  The value is stored behind the
VENDOR_DEVICE_PATH struct as a byte stream hence we need to check
if said address is appended behind the node.  Also enforce use for
uart by requiring the console speed read from the same device.

There is no scientific process for "rs:2" derivation, but evidence would
indicate that this is the correct setting for existing MMIO EFI consoles.

See also: http://bsdimp.blogspot.com/2018/07/how-to-get-memory-mapped-serial-console.html
DeltaFile
+18-0stand/efi/loader/main.c
+8-0stand/efi/loader/bootinfo.c
+26-02 files

OPNSense/src 55e365dsys/dev/axgbe if_axgbe_pci.c

axgbe: enable RSF to prevent zero-length packets while in Netmap mode

Initially, RSF (Receive Queue Store and Forward) was disabled for
unknown reasons, but the cut-through mode that's enabled as a result
seems to send 0 length packets up to the DMA when the RX queue is
full.
DeltaFile
+1-1sys/dev/axgbe/if_axgbe_pci.c
+1-11 files

OPNSense/src 1b001a9sys/dev/axgbe xgbe-phy-v2.c

axgbe: account for 4 SFP ports during GPIO expander check
DeltaFile
+36-36sys/dev/axgbe/xgbe-phy-v2.c
+36-361 files

OPNSense/src 33f308csys/dev/axgbe xgbe-phy-v2.c xgbe-i2c.c

axgbe: gracefully handle i2c bus failures

In (unknown) situations it seems the i2c bus can have trouble,
while nothing about the current link state has changed, the driver
would react by going into a link down state, and start busylooping
on up to 4 cores. Even if there was a valid link, such spinning
on a cpu by a kernel thread would wreak havoc to existing and
new connections.

This patch does the following:
1. If such a bus failure occurs, we keep the last known link state.
2. Prevent busy looping by implementing the lockmgr() facility to
be able to sleep while the i2c code waits on the i2c ISR. We cap
this with a timeout.
3. Pin the admin queues to the last CPU in the system, to prevent
other scenarios where busy looping might occur from landing on CPU
0, which especially seems to cause a lot of issues.

Given the design constraints both in hardware and in software,

    [9 lines not shown]
DeltaFile
+62-29sys/dev/axgbe/xgbe-phy-v2.c
+37-13sys/dev/axgbe/xgbe-i2c.c
+4-1sys/dev/axgbe/xgbe-mdio.c
+5-0sys/dev/axgbe/xgbe.h
+2-1sys/dev/axgbe/if_axgbe_pci.c
+1-1sys/dev/axgbe/xgbe-phy-v1.c
+111-456 files

OPNSense/src bd9e5b7sys/dev/axgbe xgbe-phy-v2.c xgbe-mdio.c

axgbe: LED control for A30 platform

Since the I/O expander chip does not do a reset when soft power
cycling, the driver will first turn off all LEDs when initializing,
although no specific routine seems to be called when powering down.
This means that the LEDs will stay on until the driver has booted up,
after which the driver will be in a consistent state.
DeltaFile
+86-0sys/dev/axgbe/xgbe-phy-v2.c
+11-2sys/dev/axgbe/xgbe-mdio.c
+10-0sys/dev/axgbe/xgbe.h
+107-23 files

OPNSense/src 7022117sys/dev/axgbe xgbe-phy-v2.c

axgbe: exclude 10G modules from miibus interface
DeltaFile
+3-0sys/dev/axgbe/xgbe-phy-v2.c
+3-01 files

OPNSense/src 5815b71sys/dev/axgbe xgbe-phy-v2.c

axgbe: also validate configuration register in GPIO expander

It is possible for a machine to boot into a state in which the configuration register,
responsible for controlling wether an I/O signal is considered an input or output,
contains randomized values. It was assumed this was programmed by the BIOS.

If I/O is reversed, it's possible for the driver to think an SFPP module has been inserted
when there is none, leading to unrecoverable I2C errors.

The configuration register should contain a state which is determined and provided by the BIOS,
hence no hard-coded values are programmed here.
DeltaFile
+50-27sys/dev/axgbe/xgbe-phy-v2.c
+50-271 files

OPNSense/src 34658d9sys/dev/axgbe xgbe-phy-v2.c xgbe-mdio.c

axgbe: move phy_stop to axgbe_if_detach()

Since the iflib interface needs axgbe_pci_init() and its phy starting capabilities, no data was passed in its absence.

With the NULL check of the axgbe_miibus we also resort back to an MDIO read as a module might be capable of both
clause 22 and clause 45 methods of communication.

with the move of phy_stop() to if_detach() in https://github.com/opnsense/src/commit/d50d4e8cd499882d4ac77765797a81306e316795, it's better to prevent reconfiguring the phy should the pci_init() callout trigger more than once.
DeltaFile
+7-0sys/dev/axgbe/xgbe-phy-v2.c
+5-1sys/dev/axgbe/xgbe-mdio.c
+1-3sys/dev/axgbe/if_axgbe_pci.c
+13-43 files