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

OPNSense/src 85bec3csys/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 b578125sys/netpfil/pf pf.c

pf: SCTP abort messages fully close the connection

As per RFC (RFC4960 section 3.3.7) an ABORT terminates the connection fully. We
should mode the state to CLOSED rather than CLOSING.

Suggested by:   Oliver Thomas
See also:       https://redmine.pfsense.org/issues/15924
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+2-2sys/netpfil/pf/pf.c
+2-21 files

OPNSense/src f10f826sys/netlink netlink_snl.h

netlink: in snl_init_writer() don't overwrite error in case of failure

PR:     290050
(cherry picked from commit 488718ff42346888243496c00cbeb42ba004171e)
DeltaFile
+3-3sys/netlink/netlink_snl.h
+3-31 files

OPNSense/src 2487dc2sbin/ipfw ipfw2.c

ipfw: Remove more unused IP_FW_* cases

All of the do_cmd() calls are in dummynet.c and specify the socket
option at compile time; none of these removed cases are used in ipfw
after the v3 work.

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53378

(cherry picked from commit 0e2e0fb955adf15a217949bc4cc337d53d2c7259)
(cherry picked from commit 6b1e5d4d20a94b5bebd726eb6d1df8dca2738f8e)
DeltaFile
+1-5sbin/ipfw/ipfw2.c
+1-51 files

OPNSense/src 39feb3asbin/ipfw ipfw2.c

ipfw: Remove IP_DUMMYNET_GET case

IP_DUMMYNET_GET is no longer used in ipfw(1).

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53348

(cherry picked from commit 28e52dea96809c7904e498759ee1f79bda929a82)
(cherry picked from commit 73c105268cc6138015241b080bc7945c6cde0fa6)
DeltaFile
+1-1sbin/ipfw/ipfw2.c
+1-11 files

OPNSense/src 41d43adsbin/ipfw ipfw2.c

ipfw: Correct error message

The failed allocation in the error pertains to IP_FW_XADD, not
IP_FW_ADD.

Reviewed by:    ae
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53359

(cherry picked from commit 498e56142660c8dd864c878e820252358c9a15cf)
(cherry picked from commit c22437c8b574878241a3c897a095ae6939e66743)
DeltaFile
+1-1sbin/ipfw/ipfw2.c
+1-11 files

OPNSense/src f7c13f3sbin/ipfw dummynet.c

ipfw: Update warning/error setsockopt references

Dummynet v3 switched to IP_DUMMYNET3 but did not update these
warnings/errors.

Fixes: cc4d3c30ea28 ("Bring in the most recent version of ipfw and dummynet, developed")
Sponsored by:   The FreeBSD Foundation
Differential Revision: sbin/ipfw/ipfw2.c

(cherry picked from commit 1f95a517880bae5fc0a9fe4463a8f2ec36ed734a)
(cherry picked from commit a5dd21c7dd1f3c8103c2fc6a1caa5635d70671aa)
DeltaFile
+2-2sbin/ipfw/dummynet.c
+2-21 files

OPNSense/src 14882c5sys/dev/e1000 if_em.c e1000_osdep.h

igb(4): Fix out-of-bounds register access on VFs

Virtual Functions have access to a limited number of registers,
and their bus space size is lower. Use KASSERT to detect out-of-bounds
access and eliminate them to avoid kernel panics in production
environment.

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

Reviewed by:    jmg
Tested by:      mateusz.moga_intel.com
Approved by:    kbowling (mentor), erj (mentor)
Sponsored by:   Intel Corporation
Differential Revision:  https://reviews.freebsd.org/D52976

(cherry picked from commit 2c02e6ca7154593d214b62578f67d9fe7db23d70)
DeltaFile
+47-36sys/dev/e1000/if_em.c
+33-13sys/dev/e1000/e1000_osdep.h
+80-492 files

OPNSense/src f8b7905sys/dev/ice ice_drv_info.h

ice(4): Add support for E835-XXV-4 adapter

Add subdevice ID and branding string for E835-XXV-4
adapter.

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

Approved by:    kbowling (mentor), erj (mentor)
Sponsored by:   Intel Corporation
Differential Revision:  https://reviews.freebsd.org/D53319

(cherry picked from commit 09b48f811b4bf3a17485680b4720d1c0a81bbe07)
DeltaFile
+3-0sys/dev/ice/ice_drv_info.h
+3-01 files

OPNSense/src 7c85688sys/dev/ice ice_drv_info.h ice_devids.h

ice(4): Add PCI IDs for E835 devices

Add device IDs and branding strings for E835 adapters.
This is a follow up for E830 adapters with Security Protocol
and Data Model (SPDM) support and RDMA support available
on 100 and 200Gbps links.

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

Approved by:    kbowling (mentor), erj (mentor)
Sponsored by:   Intel Corporation
Differential Revision:  https://reviews.freebsd.org/D52782

(cherry picked from commit b202176dc76d862f886778439b96dd1243d8b999)
DeltaFile
+39-0sys/dev/ice/ice_drv_info.h
+18-0sys/dev/ice/ice_devids.h
+9-0sys/dev/ice/ice_common.c
+66-03 files

OPNSense/src a920739sys/dev/igc if_igc.c

igc(4): Fix a typo in a sysctl description

- s/Recevied/Received/

(cherry picked from commit defe77554d134964d7c197a2f3ca552778e8b41a)
DeltaFile
+1-1sys/dev/igc/if_igc.c
+1-11 files

OPNSense/src def59b6sys/dev/ixgbe ixgbe_e610.c ixgbe_type_e610.h

ix/ixv: Add support for new Intel Ethernet E610 family devices

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

Introduce new PCI device IDs:
• 57AE: Intel(R) E610 (Backplane)
• 57AF: Intel(R) E610 (SFP)
• 57B0: Intel(R) E610 (10 GbE)
• 57B1: Intel(R) E610 (2.5 GbE)
• 57B2: Intel(R) E610 (SGMII)

Key updates for E610 family:
• Firmware manages Link and PHY
• Implement new CSR-based Admin Command Interface (ACI) for SW-FW interaction
• Tested exclusively for x64 operating systems on E610-XT2/XT4 (10G) and E610-IT4 (2.5G)
• Enable link speeds above 1G: 2.5G, 5G and 10G
• NVM Recovery Mode and Rollback support

Signed-off-by: Yogesh Bhosale yogesh.bhosale at intel.com

    [9 lines not shown]
DeltaFile
+5,567-0sys/dev/ixgbe/ixgbe_e610.c
+2,278-0sys/dev/ixgbe/ixgbe_type_e610.h
+205-26sys/dev/ixgbe/if_ix.c
+224-0sys/dev/ixgbe/ixgbe_e610.h
+68-1sys/dev/ixgbe/ixgbe_type.h
+31-0sys/dev/ixgbe/ixgbe_osdep.h
+8,373-2710 files not shown
+8,458-3616 files

OPNSense/src aa1fce8sys/dev/ixl ixl_pf_main.c if_ixl.c

ixl(4): fix multicast promiscuous mode state tracking and filter management

This change reapplies the improvements from commit 89e7335 and adds
additional fixes and code optimizations on top of it.

The ixl driver supports up to 128 multicast filters in hardware. When this
limit is exceeded, the driver should enable multicast promiscuous mode.
When the count drops below 128, it should disable promiscuous mode and
restore individual filters.

The driver previously had problems that could corrupt multicast filters list.
The main issue was that ixl_dis_multi_promisc() would attempt to disable
promiscuous mode without checking if it was actually enabled, potentially
corrupting existing filters. There was also no state tracking across driver
functions, leading to redundant operations.

This change adds an IXL_FLAGS_MC_PROMISC flag to track the multicast
promiscuous mode state. The flag is set when enabling promiscuous mode and
cleared when disabling it. Early return checks prevent redundant operations

    [12 lines not shown]
DeltaFile
+94-16sys/dev/ixl/ixl_pf_main.c
+25-2sys/dev/ixl/if_ixl.c
+1-0sys/dev/ixl/ixl.h
+120-183 files

OPNSense/src 747d7b2sys/dev/virtio/network if_vtnet.c

vtnet: don't provide VIRTIO_NET_HDR_F_DATA_VALID

According to section 5.1.6.2.1 of version 1.3 of the virtio
specification, the driver MUST NOT set VIRTIO_NET_HDR_F_DATA_VALID in
the flags. So don't do that.

Reviewed by:            Timo Völker
Differential Revision:  https://reviews.freebsd.org/D53650

(cherry picked from commit 836b3cd9d7910aff5225e9e58189067ca03fae30)
DeltaFile
+1-6sys/dev/virtio/network/if_vtnet.c
+1-61 files

OPNSense/src c3ae6f4sys/dev/virtio/network if_vtnet.c

vtnet: fix enabling/disabling tso

Transmit segment offloading depends on transmit checksum offloading.
Enforce that constraint. This also fixes a bug, since if_hwassist bits
are from the CSUM_ space, not from the IFCAP_ space.

PR:                     290773
Reviewed by:            Timo Völker
Tested by:              lg at efficientip.com
Differential Revision:  https://reviews.freebsd.org/D53629

(cherry picked from commit 4c50ac68166caf7e08c5a9984d63fa91490fa50d)
DeltaFile
+24-4sys/dev/virtio/network/if_vtnet.c
+24-41 files