OPNSense/src dd1e6ab. UPDATING, sys/conf newvers.sh

Add UPDATING entries and bump version.

Approved by:    so
DeltaFile
+5-0UPDATING
+1-1sys/conf/newvers.sh
+6-12 files

OPNSense/src ffd7b3dcontrib/unbound/iterator iter_scrub.c

Add a fix to scrub unsolicited NS RRSets to prevent cache poisoning.

Approved by:    so
Obtained from:  NLnet Labs
Security:       FreeBSD-SA-25:10.unbound
Security:       CVE-2025-11411
DeltaFile
+51-4contrib/unbound/iterator/iter_scrub.c
+51-41 files

OPNSense/src dec5065sys/netpfil/pf pf.c

pf: IPv6 divert support test based on previous code
DeltaFile
+46-3sys/netpfil/pf/pf.c
+46-31 files

OPNSense/src bb361b2sys/netinet ip_divert.c ip_var.h, sys/netpfil/ipfw ip_fw_pfil.c

divert: Define semantics for SO_REUSEPORT_LB on divert sockets

Allow SO_REUSEPORT_LB to be set on divert sockets.  If set, then bind()
will add the socket to a "load-balancing group".  When a divert-to rule
matches a port with an associated group, the corresponding state ID is
used to select a specific socket from the group.  Packets without an
associated state are simply forwarded to the first socket in the group.

This implementation is simple but has some caveats, the main one being
that if sockets are added to the group while flows are being processed,
the size of the group will change and this changes the mapping of state
IDs to sockets.  So, to get a consistent mapping, the divert socket
application must bind all of its sockets before any traffic is processed
by pf.
DeltaFile
+112-12sys/netinet/ip_divert.c
+1-1sys/netinet/ip_var.h
+1-1sys/netinet/raw_ip.c
+1-1sys/netpfil/ipfw/ip_fw_pfil.c
+1-1sys/netpfil/pf/pf.c
+116-165 files

OPNSense/src 399af2csys/netinet ip_divert.c

ipdivert: Use CK_SLISTs for the divcb hash table

The hash table is accessed in ip_divert_packet(), and there the accesses
are synchronized only by the net epoch, so plain SLIST is not safe.
DeltaFile
+9-9sys/netinet/ip_divert.c
+9-91 files

OPNSense/src ae0f2c9sys/netpfil/pf pf.c

pf: Rationalize the ip_divert_ptr test

If a rule has a divert port set, then we can reasonably predict that
ipdivert.ko is loaded, and in particular that ip_divert_ptr is set.

Moreover, in this case, if ipdivert.ko is not loaded we should just drop
the packet instead of ignoring the divert rule.

No functional change intended.
DeltaFile
+9-5sys/netpfil/pf/pf.c
+9-51 files

OPNSense/src 5903271sys/dev/ixgbe if_ix.c ixgbe.h

ix(4): Add support for debug dump for E610 adapters

This is part 2 of the support for the new Intel Ethernet E610 family of devices.

Intel E610 Ethernet Controller devices feature a debug dump capability
that allows you to capture runtime register values directly from the
hardware, with assistance from the firmware. These registers are
organized into clusters based on their function, enabling targeted
debugging. This information is consolidated into a single dump file,
facilitating the debugging of complex issues encountered in the field.
The debug dump provides a snapshot of the device's current hardware
configuration, including switch tables, transmit scheduler tables, and
other relevant data. It captures the state of specified clusters and
serves as a stateless snapshot of the entire device.

This update introduces ioctl and sysctl support for the debug dump feature.

Signed-off-by: Yogesh Bhosale yogesh.bhosale at intel.com
Co-developed-by: Krzysztof Galazka krzysztof.galazka at intel.com

    [7 lines not shown]
DeltaFile
+521-0sys/dev/ixgbe/if_ix.c
+52-0sys/dev/ixgbe/ixgbe.h
+1-0sys/dev/ixgbe/ixgbe_features.h
+574-03 files

OPNSense/src b3969c4sys/dev/e1000 if_em.c

igb(4): Fix VLAN support on VFs

Virtual Functions are considered untrusted and have no control
over VLAN filtering configuration in HW. To allow using
VLANs on VF intreface driver has to assume that VLAN HW Filtering
is always enabled and pass requests for adding or removing VLAN
tags to Physical Function driver using Mailbox API.

Signed-off-by: Krzysztof Galazka <krzysztof.galazka at intel.com>

Approved by:    kbowling (mentor)
Reviewed by:    erj (previous version)
Tested by:      gowtham.kumar.ks_intel.com
Sponsored by:   Intel Corporation
Differential Revision:  https://reviews.freebsd.org/D53245

(cherry picked from commit 1839526b7315cae62efbd2d1493e6243439effcb)
DeltaFile
+20-14sys/dev/e1000/if_em.c
+20-141 files

OPNSense/src abdb9fcsys/netpfil/pf pf.c, tests/sys/netpfil/pf divert-to.sh

pf: handle divert packets

In a divert setup pf_test_state() may return PF_PASS, but not set the state
pointer. We didn't handle that, and as a result crashed immediately afterwards
trying to dereference that NULL state pointer.

Add a test case to provoke the problem.

PR:             260867
MFC after:      2 weeks
Submitted by:   Phil Budne <phil.budne at gmail.com>
Sponsored by:   Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 66f2f1c83247f05a3a599d7e88c7e7efbedd16b5)
DeltaFile
+42-2tests/sys/netpfil/pf/divert-to.sh
+12-8sys/netpfil/pf/pf.c
+54-102 files

OPNSense/src 9fd9572sys/net if_ovpn.c

if_ovpn: use IFT_TUNNEL

IFT_ENC has special behaviour in pf we don't desire, and this also ensures that
for all interface types there is N:1:1 correspondence between if_type:dlt:header len.

Requested by:   glebius
MFC after:      1 week

(cherry picked from commit ff9f76a206c80c263050816735d537a151ee2999)
DeltaFile
+1-1sys/net/if_ovpn.c
+1-11 files

OPNSense/src 501cb04sys/netpfil/pf pf.c

pf: IPv6 divert support test based on previous code
DeltaFile
+46-3sys/netpfil/pf/pf.c
+46-31 files

OPNSense/src 7a16facsys/netinet ip_divert.c ip_var.h, sys/netpfil/ipfw ip_fw_pfil.c

divert: Define semantics for SO_REUSEPORT_LB on divert sockets

Allow SO_REUSEPORT_LB to be set on divert sockets.  If set, then bind()
will add the socket to a "load-balancing group".  When a divert-to rule
matches a port with an associated group, the corresponding state ID is
used to select a specific socket from the group.  Packets without an
associated state are simply forwarded to the first socket in the group.

This implementation is simple but has some caveats, the main one being
that if sockets are added to the group while flows are being processed,
the size of the group will change and this changes the mapping of state
IDs to sockets.  So, to get a consistent mapping, the divert socket
application must bind all of its sockets before any traffic is processed
by pf.
DeltaFile
+112-12sys/netinet/ip_divert.c
+1-1sys/netinet/ip_var.h
+1-1sys/netinet/raw_ip.c
+1-1sys/netpfil/ipfw/ip_fw_pfil.c
+1-1sys/netpfil/pf/pf.c
+116-165 files

OPNSense/src 7c5da6esys/netpfil/pf pf.c

pf: Rationalize the ip_divert_ptr test

If a rule has a divert port set, then we can reasonably predict that
ipdivert.ko is loaded, and in particular that ip_divert_ptr is set.

Moreover, in this case, if ipdivert.ko is not loaded we should just drop
the packet instead of ignoring the divert rule.

No functional change intended.
DeltaFile
+9-5sys/netpfil/pf/pf.c
+9-51 files

OPNSense/src c3479bfsys/netinet ip_divert.c

ipdivert: Use CK_SLISTs for the divcb hash table

The hash table is accessed in ip_divert_packet(), and there the accesses
are synchronized only by the net epoch, so plain SLIST is not safe.
DeltaFile
+9-9sys/netinet/ip_divert.c
+9-91 files

OPNSense/src 4ae848dsys/netpfil/pf pf_ioctl.c

pf: reading rules with a read lock #272
DeltaFile
+14-11sys/netpfil/pf/pf_ioctl.c
+14-111 files

OPNSense/src 1e64b06sys/netpfil/pf pf_ioctl.c

pf: reading rules with a read lock #272
DeltaFile
+14-11sys/netpfil/pf/pf_ioctl.c
+14-111 files

OPNSense/src f46cda6tests/sys/netpfil/pf sctp.sh

tests/sys/netpfil/pf/sctp: make use of required.kmods

This greatly speeds up skipping a test that can't be run.

Sponsored by:   ConnectWise
Reviewed by:    kp
Differential Revision: https://reviews.freebsd.org/D53215

(cherry picked from commit 7648d2ebda22fe21ed385cc7d76813a1a9c17c99)
DeltaFile
+11-7tests/sys/netpfil/pf/sctp.sh
+11-71 files

OPNSense/src 43877e6sys/netpfil/pf pf.c pf_mtag.h

pf: avoid passing through dummynet multiple times

In some setups we end up with multiple states created for a single
packet, which in turn can mean we run the packet through dummynet
multiple times. That's not expected or intended. Mark each packet when
it goes through dummynet, and do not pass packet through dummynet if
they're marked as having already passed through.

See also:       https://redmine.pfsense.org/issues/14854
Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D44365
DeltaFile
+4-0sys/netpfil/pf/pf.c
+1-1sys/netpfil/pf/pf_mtag.h
+5-12 files

OPNSense/src 42f47ccsys/netpfil/pf pf.c

pf: fix reply-to after rdr and dummynet

If we redirect a packet to localhost and it gets dummynet'd it may be
re-injected later (e.g. when delayed) which means it will be passed
through ip_input() again. ip_input() will then reject the packet because
it's directed to the loopback address, but did not arrive on a loopback
interface.

Fix this by having pf set the rcvif to V_iflo if we redirect to
loopback.

See also:       https://redmine.pfsense.org/issues/15363
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+12-0sys/netpfil/pf/pf.c
+12-01 files

OPNSense/src 3f1f62dsys/netpfil/pf pf.c

pf: fix dummynet + route-to

Ensure that we pick the correct dummynet pipe (i.e. forward vs. reverse
direction) when applying route-to.

We mark the processing as outbound so that dummynet will re-inject in
the correct phase of processing after it's done with the packet, but
that will cause us to pick the wrong pipe number. Reverse them so that
the incorrect decision ends up picking the correct pipe.

Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D44366
DeltaFile
+21-5sys/netpfil/pf/pf.c
+21-51 files

OPNSense/src a802844sys/netpfil/pf pf.c

pf: fix dummynet + route-to for IPv6

Apply the fixes from c6f1116357904 and b8ef285f6cc6a to IPv6 as well.

Ensure that when dummynet re-injects it does so in the correct direction, and
uses the correct dummynet pipes.

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+22-0sys/netpfil/pf/pf.c
+22-01 files

OPNSense/src c6e660csys/netpfil/pf pf.c

pf: ensure dummynet gets the correct direction after route-to

If we apply a route-to to an inbound packet pf_route() may hand that
packet over to dummynet. Dummynet may then delay the packet, and later
re-inject it. This re-injection (in dummynet_send()) needs to know
if the packet was inbound or outbound, to call the correct path for
continued processing.

That's done based on the pf_pdesc we pass along (through
pf_dummynet_route() and pf_pdesc_to_dnflow()). In the case of pf_route()
on inbound packets that may be wrong, because we're called in the input
path, and didn't update pf_pdesc->dir.

This can manifest in issues with fragmented packets. For example, a
fragmented packet will be re-fragmented in pf_route(), and if dummynet
makes different decisions for some of the fragments (that is, it delays
some and allows others to pass through directly) this will break.

The packets that pass through dummynet without delay will be transmitted

    [15 lines not shown]
DeltaFile
+6-0sys/netpfil/pf/pf.c
+6-01 files

OPNSense/src 11c2531sys/netpfil/pf pf.c pf_mtag.h

Revert "pf: avoid passing through dummynet multiple times"

This reverts commit d8322a6ac465ffe2ef432a4b4d608afdd03150da.

There's no evidence this does anything so leave out changing
pf-dummynet code in this release iteration.
DeltaFile
+0-4sys/netpfil/pf/pf.c
+1-1sys/netpfil/pf/pf_mtag.h
+1-52 files

OPNSense/src cf60ea5sys/netpfil/pf pf.c

pf: fix reply-to after rdr and dummynet

If we redirect a packet to localhost and it gets dummynet'd it may be
re-injected later (e.g. when delayed) which means it will be passed
through ip_input() again. ip_input() will then reject the packet because
it's directed to the loopback address, but did not arrive on a loopback
interface.

Fix this by having pf set the rcvif to V_iflo if we redirect to
loopback.

See also:       https://redmine.pfsense.org/issues/15363
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+12-0sys/netpfil/pf/pf.c
+12-01 files

OPNSense/src 2d9cb38sys/netpfil/pf pf.c

pf: fix dummynet + route-to for IPv6

Apply the fixes from c6f1116357904 and b8ef285f6cc6a to IPv6 as well.

Ensure that when dummynet re-injects it does so in the correct direction, and
uses the correct dummynet pipes.

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+22-0sys/netpfil/pf/pf.c
+22-01 files

OPNSense/src b56ac99sys/netpfil/pf pf.c

pf: fix dummynet + route-to

Ensure that we pick the correct dummynet pipe (i.e. forward vs. reverse
direction) when applying route-to.

We mark the processing as outbound so that dummynet will re-inject in
the correct phase of processing after it's done with the packet, but
that will cause us to pick the wrong pipe number. Reverse them so that
the incorrect decision ends up picking the correct pipe.

Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D44366
DeltaFile
+21-5sys/netpfil/pf/pf.c
+21-51 files

OPNSense/src eede17esys/netpfil/pf pf.c

pf: ensure dummynet gets the correct direction after route-to

If we apply a route-to to an inbound packet pf_route() may hand that
packet over to dummynet. Dummynet may then delay the packet, and later
re-inject it. This re-injection (in dummynet_send()) needs to know
if the packet was inbound or outbound, to call the correct path for
continued processing.

That's done based on the pf_pdesc we pass along (through
pf_dummynet_route() and pf_pdesc_to_dnflow()). In the case of pf_route()
on inbound packets that may be wrong, because we're called in the input
path, and didn't update pf_pdesc->dir.

This can manifest in issues with fragmented packets. For example, a
fragmented packet will be re-fragmented in pf_route(), and if dummynet
makes different decisions for some of the fragments (that is, it delays
some and allows others to pass through directly) this will break.

The packets that pass through dummynet without delay will be transmitted

    [15 lines not shown]
DeltaFile
+6-0sys/netpfil/pf/pf.c
+6-01 files

OPNSense/src d8322a6sys/netpfil/pf pf.c pf_mtag.h

pf: avoid passing through dummynet multiple times

In some setups we end up with multiple states created for a single
packet, which in turn can mean we run the packet through dummynet
multiple times. That's not expected or intended. Mark each packet when
it goes through dummynet, and do not pass packet through dummynet if
they're marked as having already passed through.

See also:       https://redmine.pfsense.org/issues/14854
Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D44365
DeltaFile
+4-0sys/netpfil/pf/pf.c
+1-1sys/netpfil/pf/pf_mtag.h
+5-12 files

OPNSense/src 72ff6bdsys/netpfil/pf pf.c

pf: fix dummynet + route-to for IPv6

Apply the fixes from c6f1116357904 and b8ef285f6cc6a to IPv6 as well.

Ensure that when dummynet re-injects it does so in the correct direction, and
uses the correct dummynet pipes.

Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+22-0sys/netpfil/pf/pf.c
+22-01 files

OPNSense/src 0b16335sys/netpfil/pf pf.c

pf: fix dummynet + route-to

Ensure that we pick the correct dummynet pipe (i.e. forward vs. reverse
direction) when applying route-to.

We mark the processing as outbound so that dummynet will re-inject in
the correct phase of processing after it's done with the packet, but
that will cause us to pick the wrong pipe number. Reverse them so that
the incorrect decision ends up picking the correct pipe.

Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision:  https://reviews.freebsd.org/D44366
DeltaFile
+21-5sys/netpfil/pf/pf.c
+21-51 files