OPNSense/plugins ece19f2www/caddy/src/opnsense/mvc/app/views/OPNsense/Caddy reverse_proxy.volt

www/caddy: Small style fix for new selectpicker "Filter by Domain" (#3953)

DeltaFile
+1-4www/caddy/src/opnsense/mvc/app/views/OPNsense/Caddy/reverse_proxy.volt
+1-41 files

OPNSense/src 18a10f2sys/net if_arp.h, sys/netinet if_ether.c

Support ARP for 802 networks

This is used by 802.3 Ethernet.  (Also be used by 802.4 Token Bus and
802.5 Token Ring, but we don't support those.)

This was accidentally removed along with FDDI support in commit
0437c8e3b198, presumably because comments implied it was used only by
FDDI or Token Ring.

Fixes: 0437c8e3b198 ("Remove support for FDDI networks.")
Reviewed-by: emaste
Signed-off-by: Denny Page <dennypage at me.com>
Pull-request: https://github.com/freebsd/freebsd-src/pull/1166
(cherry picked from commit fcdf9a19893b9b5beb7a21407de507f0ae4c500b)
(cherry picked from commit d776dd5fbd484acdf00f6df55583e9aa53226859)
DeltaFile
+4-0sys/netinet/if_ether.c
+1-1sys/net/if_arp.h
+5-12 files

OPNSense/src 1dafe8dsbin/ifconfig ifieee80211.c

ifconfig(8): Fix two typos in source code comments

- s/the the/the/

(cherry picked from commit 68b9eb9185f5569d05b5fecb178048f00c3b5c1a)
DeltaFile
+2-2sbin/ifconfig/ifieee80211.c
+2-21 files

OPNSense/src a5445d7sys/netpfil/ipfilter/netinet ip_fil.h ip_ftp_pxy.c, sys/netpfil/pf pf.c

netpfil: Fix typos in source code comments

- s/addres/address/

(cherry picked from commit 8ce3ef5f35fd4dc442b1a33605ca7d3132047faf)
DeltaFile
+2-2sys/netpfil/ipfilter/netinet/ip_fil.h
+1-1sys/netpfil/ipfilter/netinet/ip_ftp_pxy.c
+1-1sys/netpfil/pf/pf.c
+4-43 files

OPNSense/src 6de1b07sys/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 96b25ffsys/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

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):

    net.inet.rss.bits: 3 (for 8 CPUs)

    [5 lines not shown]
DeltaFile
+37-1sys/net/rss_config.c
+20-0sys/netinet6/ip6_input.c
+19-0sys/netinet/ip_input.c
+12-7sys/net/if_gre.c
+7-0sys/netinet6/frag6.c
+6-0sys/net/if_ethersubr.c
+101-811 files not shown
+131-1017 files

OPNSense/src 25348b3.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 52bedb8stand/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 dab9f04sys/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 4fabeb5share/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 428f067sys/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 769c4aesys/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/xgbe-dev.c
+1-1sys/dev/axgbe/if_axgbe_pci.c
+12-124 files

OPNSense/src 7a33b5fsys/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 bfab03fsys/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 1cd9e2esys/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 768ab01sys/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 bff2022sys/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 d75270asys/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 4cdd28bsys/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 f4be892sys/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 1b1fe13sys/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 8bb73ebsys/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 f7dc43flibexec/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 74f3fe3libexec/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 bfdfa74lib/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 8560b1csys/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 6e9ea8bsys/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 400fb25bin/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-0bin/csh/dot.cshrc
+4-0share/skel/dot.cshrc
+4-0usr.bin/vi/Makefile
+1-1share/skel/dot.profile
+29-15 files

OPNSense/src 2e48551sys/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 948d5e2sys/netinet ip_input.c, sys/netinet6 ip6_input.c in6.h

dummynet: passin after dispatch

Based on a patch originally found in m0n0wall, expanded
to IPv6 and aligned with FreeBSD's IP input path.

The limit may not be correctly accounted for on the WAN
interface due to dummynet counting the packet again even
though it was already processed.

The problem here is that there's no proper way to reinject
the packet at the point where it was previously removed
from so we make the assumption that ip input was already
done (including pfil) and more or less directly move to
packet output processing.

While here move the passin label up to take the extra check
but avoiding a second label.  Also remove the spurious tag
read for forward check since we don't use it and we should
really trust the mbuf flag.
DeltaFile
+12-2sys/netinet/ip_input.c
+11-3sys/netinet6/ip6_input.c
+6-0sys/netpfil/ipfw/ip_dn_io.c
+1-0sys/netinet6/in6.h
+30-54 files