OPNSense/src 6dbfecasys/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 a0bbf48sys/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
+441-22912 files

OPNSense/src 0629a52sys/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
+449-22912 files

OPNSense/core 862b1d7src/opnsense/mvc/app/controllers/OPNsense/Trust/Api CrlController.php

System: Trust: Revocation - forgot to persist new lifetime, causing the following exception:

Exception: Failed to parse time string (+ days) at position 0 (+): Unexpected character in /usr/local/opnsense/mvc/app/controllers/OPNsense/Trust/Api/CrlController.php:347
Stack trace:
DeltaFile
+1-0src/opnsense/mvc/app/controllers/OPNsense/Trust/Api/CrlController.php
+1-01 files

OPNSense/core 633ba99src/opnsense/mvc/app/views/OPNsense/Trust crl.volt

System: Trust: Revocation - check input before use on revoked selectors
DeltaFile
+1-1src/opnsense/mvc/app/views/OPNsense/Trust/crl.volt
+1-11 files

OPNSense/src f058c68sys/netpfil/pf pf.c

pf: show differences between route functions
DeltaFile
+38-192sys/netpfil/pf/pf.c
+38-1921 files

OPNSense/src 2abbd75share/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 6e008e7sys/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 7021c6b.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 4cfe298sys/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 a636ddbsys/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 ced81dfsys/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 1d12815sys/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 03393aasys/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 1367e79sys/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 cc08811sys/dev/axgbe xgbe-phy-v2.c

axgbe: apply RRC to miibus attached PHYs and add support for variable bitrate 25G SFP+ DACs
DeltaFile
+43-16sys/dev/axgbe/xgbe-phy-v2.c
+43-161 files

OPNSense/src 82ed26bstand/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 f57bf37sys/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

OPNSense/src e096499lib/libnetmap nmreq.c

libnetmap: remove interface name validation

When trying to use a VLAN device (e.g. "em0.123") with a dot
the library fails to parse the interface correctly. The former
pattern is much too restrictive given that almost all characters
can be coerced into a device name via ifconfig.

Remove the particularly restrictive validation.  Some characters
still cannot be used as an interface name as they are used as
delimiters in the syntax, but this allows to be able to use most
of them without an issue.

Submitted by:   franco at opnsense.org
Differential Revision:  https://reviews.freebsd.org/D42485
Reviewed by:    vmaffione

(cherry picked from commit ad874544d9f018bf8eef4053b5ca7b856c4674cb)
DeltaFile
+0-5lib/libnetmap/nmreq.c
+0-51 files

OPNSense/src 7923055libexec/getty gettytab

tty: patch in 3wire autologin support

PR: https://github.com/opnsense/core/issues/3921
DeltaFile
+18-0libexec/getty/gettytab
+18-01 files

OPNSense/src efb8178sys/dev/axgbe xgbe-phy-v2.c if_axgbe_pci.c

axgbe: several patches from 22.1 not yet present in FreeBSD
DeltaFile
+212-12sys/dev/axgbe/xgbe-phy-v2.c
+66-24sys/dev/axgbe/if_axgbe_pci.c
+24-0sys/dev/axgbe/xgbe-common.h
+14-0sys/dev/axgbe/xgbe-sysctl.c
+9-1sys/dev/axgbe/xgbe-dev.c
+1-6sys/dev/axgbe/xgbe-txrx.c
+326-433 files not shown
+330-489 files

OPNSense/src 66b2b65libexec/rc rc.subr, share/man/man8 rc.subr.8

rc: also run NAME_setup on NAME_reload

Reload is used for service reconfiguration as well
and lacks a NAME_prepend-like mechanism so it makes
sense to extend the NAME_reload hook into this
action.

precmd may use configuration checks and blocks setup
from doing its designated work (e.g. nginx). In moving
the invoke of the setup script in front allows us to
provide custom scripts for config file generation and
fixing prior to precmd checking configuration integrity.

Also introduce _run_rc_setup to separate the launcher
from the main one. Let it run correctly in the case
of restart_precmd and block further execution as
would be the case in start due to the internal plumbing
of restart being split into calling stop and start
afterwards.

    [2 lines not shown]
DeltaFile
+45-24libexec/rc/rc.subr
+10-3share/man/man8/rc.subr.8
+55-272 files

OPNSense/src b99f940sys/fs/tmpfs tmpfs_subr.c

tmpfs: allow recurse as that does happen when using unionfs
DeltaFile
+1-1sys/fs/tmpfs/tmpfs_subr.c
+1-11 files

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

axgbe: fix link issues for gigabit external SFP PHYs and 100/1000 fiber modules

Within the code path of autonegotiation for gigabit SFP modules was a bug, causing
a report of LINK_ERR for cases where an external SFP PHY was present. Fixing this issue
did not resolve to a link however, as it turned out that while autonegotiation interrupts
were happening, it's resulting status cannot be correctly determined in all cases. In these
specific cases we have no other option than to assume a module has negotiated to 1Gbit/s.

PHY-specific configuration has been delegated to the miibus driver, if an external PHY is present.
It's possible that the i2c bus does not recognize a PHY on the first pass, so in all cases we
retry up to a maximum of 5 times during each link poll pass to ensure we didn't miss the presence
of an external PHY.

This commit also addresses link issues on both 100 mbit and 1Gb fiber modules. Not all of these modules
have the correct data set according to SFF-8472, as such we first check for gigabit compliance and
the associated baudrate, otherwise we resort back to determining what type of fiber module is plugged
in by checking the baudrate, cable length and wavelength and setting the MAC speed accordingly.
DeltaFile
+96-20sys/dev/axgbe/xgbe-phy-v2.c
+1-5sys/dev/axgbe/xgbe-mdio.c
+1-1sys/dev/axgbe/xgbe-i2c.c
+98-263 files

OPNSense/src aba5d5bsys/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 0bf6095sys/netpfil/pf if_pflog.c

pflog: log packet dropped by default rule with drop

Taken from: https://github.com/openbsd/src/commit/7b8683a1743e7
DeltaFile
+3-1sys/netpfil/pf/if_pflog.c
+3-11 files

OPNSense/src 4510f25sys/modules Makefile, sys/modules/apuled apuled.c Makefile

apuled: import APU 1-3 LED kernel module

Taken from: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=189772
PR: https://github.com/opnsense/core/issues/2114
DeltaFile
+685-0sys/modules/apuled/apuled.c
+4-0sys/modules/apuled/Makefile
+2-0sys/modules/Makefile
+691-03 files

OPNSense/src 7c6cbd7sys/dev/netmap netmap.c netmap_mem2.c

netmap: ring size limit not enough for multi-queue em(4)

Also mutes a spammy message.  Bravely going where no man
has gone before.  :)
DeltaFile
+1-1sys/dev/netmap/netmap.c
+1-1sys/dev/netmap/netmap_mem2.c
+2-22 files

OPNSense/src a2e3920bin/csh dot.cshrc, share/skel dot.cshrc dot.profile

etc: OPNsense customisations

o add more key bindings to .cshrc
o add .vimrc to base installation
o disable fortune cookie
DeltaFile
+16-0usr.bin/vi/dot.vimrc
+4-0share/skel/dot.cshrc
+4-0usr.bin/vi/Makefile
+4-0bin/csh/dot.cshrc
+1-1share/skel/dot.profile
+29-15 files

OPNSense/src 927c711usr.sbin/bsdinstall/partedit partedit_x86.c

bsdinstall: react to WORKAROUND_HYBRID to force UEFI install on BIOS boot
DeltaFile
+2-1usr.sbin/bsdinstall/partedit/partedit_x86.c
+2-11 files