OPNSense/core 64dbf01src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes BaseListField.php AuthGroupField.php

mvc: BaseListField: shared implementation of $internalStaticOptionList, proof of concept for https://github.com/opnsense/core/issues/9816

Wrap static access in protected functions which ensures content is static per inherited class:

hasStaticOptions()
getStaticOptions()
setStaticOptions(array)
resetStaticOptions()
DeltaFile
+26-0src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/BaseListField.php
+7-13src/opnsense/mvc/app/models/OPNsense/Base/FieldTypes/AuthGroupField.php
+33-132 files

OPNSense/core 3316148src/opnsense/mvc/app/controllers/OPNsense/Unbound/Api OverviewController.php

unbound: simplify getPoliciesAction() a bit for  https://github.com/opnsense/core/issues/9814
DeltaFile
+1-7src/opnsense/mvc/app/controllers/OPNsense/Unbound/Api/OverviewController.php
+1-71 files

OPNSense/core 00b5984src/opnsense/mvc/app/controllers/OPNsense/Unbound/Api OverviewController.php, src/opnsense/mvc/app/views/OPNsense/Unbound overview.volt

unbound: move policy fetch to the controller, clean up accordingly. Fixes https://github.com/opnsense/core/issues/9814
DeltaFile
+104-108src/opnsense/mvc/app/views/OPNsense/Unbound/overview.volt
+9-26src/opnsense/mvc/app/controllers/OPNsense/Unbound/Api/OverviewController.php
+113-1342 files

OPNSense/core 0c84963src/opnsense/www/js opnsense_bootgrid.js

bootgrid: swap order of custom commands placement making sure they participate in command binding

(cherry picked from commit 5b3b163ce0d93d41fcb141807c6d76389178ad1b)
DeltaFile
+5-5src/opnsense/www/js/opnsense_bootgrid.js
+5-51 files

OPNSense/src 2e22159sys/netpfil/pf pf_ioctl.c

pf: Use proper prototype for SYSINIT functions

MFC after:      1 week

(cherry picked from commit 0ce8c20fcd44c1595b42fcb540913d3802edd438)
(cherry picked from commit 34462748d79a6e2ea8215564286f97e93670dfbb)
DeltaFile
+2-2sys/netpfil/pf/pf_ioctl.c
+2-21 files

OPNSense/src 2c6944fsys/netpfil/ipfw ip_fw2.c ip_fw_nat.c

ipfw: Use proper prototype for SYSINIT functions

The only possible return value of function ipfw_init() is 0. Make it
return void to match the prototype of SYSINIT.

MFC after:      1 week

(cherry picked from commit 1bba2194c8a960235f8eae36e7d3e96f347ce779)
(cherry picked from commit 745b6ca4ed933f9f4c1d314dc7b0aa31e8e9e0de)
DeltaFile
+3-6sys/netpfil/ipfw/ip_fw2.c
+2-2sys/netpfil/ipfw/ip_fw_nat.c
+5-82 files

OPNSense/src 77d0070usr.sbin/bsdinstall bsdinstall.8

bsdinstall.8: Minor maintenance

Replace CD-ROMs with "discs, USBs, or network boot environments"
to both modernize aesthetic and also nudge youths to think at scale.
Since I'm disrupting the flow of these lines anyway, expand the VM
acronym because I think this is one of the first manuals people will
be looking at.

Reset list alignment to seven characters. It was at 19 characters,
and that was not enough to align them all, wasting many extra lines
by crunching all the words over. Seven actually bought us some lines
from six due to avg item size. Tag SPDX.

MFC after:      3 days
Discussed with: ivy, zi

(cherry picked from commit 81d9e08a4df42079d5e163b5991d5d6f3a28d4f0)
DeltaFile
+11-8usr.sbin/bsdinstall/bsdinstall.8
+11-81 files

OPNSense/src 89058b9sys/netipsec xform_ipcomp.c

netipsec: Use proper prototype for SYSINIT functions

MFC after:      1 week

(cherry picked from commit 360bb45690d918fac5bae78ab44f45d11327067a)
(cherry picked from commit a32ee2897f8eed4a03976be65020912f03f7228e)
DeltaFile
+2-2sys/netipsec/xform_ipcomp.c
+2-21 files

OPNSense/src 9d3a11csys/netinet6 ip6_mroute.c

ip6_mroute: Fix the UPCALL_TIMING build

MFC after:      2 weeks
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.

(cherry picked from commit 5bb953b095461b488b102ab3025f42cd2ef61f9d)
DeltaFile
+1-1sys/netinet6/ip6_mroute.c
+1-11 files

OPNSense/src b2d3c64sys/netinet6 ip6_mroute.c

ip6_mroute: Remove an unhelpful comment

ifnets already track if_allmulti() calls in the if_amcount field.  That
field is older than the comment, so I'm not exactly sure what the intent
was; let's just remove it.

MFC after:      2 weeks
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.

(cherry picked from commit a45fb94801dffd414bdb1981def0e977ef0c774f)
DeltaFile
+0-4sys/netinet6/ip6_mroute.c
+0-41 files

OPNSense/src 366c3d7sys/netinet6 ip6_mroute.c

ip6_mroute: Make MF6CFIND a regular function

This is more natural and corresponds more closely to the v4 multicast
routing code.  No functional change intended.

Reviewed by:    glebius
MFC after:      2 weeks
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D54983

(cherry picked from commit b370fcc716b9cfd4d08e291f0009f02452c84d64)
DeltaFile
+20-25sys/netinet6/ip6_mroute.c
+20-251 files

OPNSense/src 9d4eb1asys/netinet6 ip6_mroute.c

ip6_mroute: Remove an unused constant

No functional change intended.

MFC after:      2 weeks
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.

(cherry picked from commit b320e89e6909c0c3f29542976df0381990866988)
DeltaFile
+0-2sys/netinet6/ip6_mroute.c
+0-21 files

OPNSense/src 07c0d54sys/netinet6 ip6_mroute.c

ip6_mroute: Mark functions as static

No functional change intended.

MFC after:      2 weeks
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.

(cherry picked from commit a03eabfebbce15d8ce028168969812d3ca2be206)
(cherry picked from commit ebc9a98c1b7d0a47359dae34509e1d9c02767a88)
DeltaFile
+10-10sys/netinet6/ip6_mroute.c
+10-101 files

OPNSense/src f5f369fsys/netinet6 in6_fib_algo.c

netinet6: Use proper prototype for SYSINIT functions

MFC after:      1 week

(cherry picked from commit d4a80fa271b148b269869e5ca34e1861d9fcdfb0)
(cherry picked from commit cfc237162c248d0488e264bf1fdae0186c5a13c1)
DeltaFile
+1-1sys/netinet6/in6_fib_algo.c
+1-11 files

OPNSense/src 5ee3f73sys/netinet siftr.c

siftr: refactor batch log processing

Refactoring to perform the batch processing of
log messaged in two phases. First cycling through a limited
number of collected packets, and only thereafter freeing
the processed packets. This prevents any chance of calling
free while in a critical / spinlocked section.

Reviewed By:           tuexen
Sponsored by:          NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D42949

(cherry picked from commit a95cd6e4870b79178860e03366c4327e533ecf1e)
DeltaFile
+16-23sys/netinet/siftr.c
+16-231 files

OPNSense/src b83e384sys/netinet siftr.c

siftr: flush pkt_nodes to the log file in batch

Reviewed by: rscheff, tuexen
Differential Revision: https://reviews.freebsd.org/D41175

(cherry picked from commit fafb03ab4254ab0d3927bc8ec22e4ba432efdbeb)
DeltaFile
+55-18sys/netinet/siftr.c
+55-181 files

OPNSense/src 5a6ee6asys/netinet ip_mroute.c, sys/netinet6 ip6_mroute.c raw_ip6.c

ip_mroute: Make privilege checking more consistent

- The v6 socket option and ioctl handlers had no privilege checks at
  all.  The socket options, I believe, can only be reached via a raw
  socket, but a jailed root user with a raw socket shouldn't be able to
  configure multicast routing in a non-VNET jail.  The ioctls can only
  be used to fetch stats.
- Delete a bogus comment in X_mrt_ioctl(), one can issue multicast
  routing ioctls against any socket.  Note that the call path is
  soo_ioctl()->rtioctl_fib()->mrt_ioctl().

I think all of the mroute privilege checks should be done within the
ip(6)_mroute code, but let's first make the v4 and v6 modules
consistent.

Reviewed by:    glebius
MFC after:      2 weeks
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.

    [3 lines not shown]
DeltaFile
+9-6sys/netinet6/ip6_mroute.c
+6-0sys/netinet6/raw_ip6.c
+0-5sys/netinet/ip_mroute.c
+15-113 files

OPNSense/src 9ad99a2sys/netinet ip_mroute.c ip_mroute.h

ip_mroute: Convert to using a regular mutex

The multicast routing code was using spin mutexes for packet counting,
but there is no reason to use them instead of regular mutexes, given
that none of this code runs in an interrupt context.  Convert to using
default mutexes.

Reviewed by:    glebius
MFC after:      2 weeks
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.
Differential Revision:  https://reviews.freebsd.org/D54603

(cherry picked from commit a265c8b4a5a7c8fdd33e27b8f74bd2a514f82c70)
DeltaFile
+18-17sys/netinet/ip_mroute.c
+5-5sys/netinet/ip_mroute.h
+23-222 files

OPNSense/src 5c48d7bsys/netinet ip_mroute.c

ip_mroute: EVENTHANDLER_REGISTER does not fail

No functional change intended.

MFC after:      1 week
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.

(cherry picked from commit 0f1e1350704af555a4b30136f5f3d16db6f2dc51)
DeltaFile
+0-6sys/netinet/ip_mroute.c
+0-61 files

OPNSense/src 4b02370sys/netinet in_fib_algo.c, sys/netinet/cc cc.c

netinet: Use proper prototype for SYSINIT functions

MFC after:      1 week

(cherry picked from commit 6613b6ad1ecc5384c119018b9b27c18bd7516e3f)
(cherry picked from commit 5b41be5cc0666372840d798507e85544d8a3e7c3)
DeltaFile
+1-1sys/netinet/cc/cc.c
+1-1sys/netinet/in_fib_algo.c
+2-22 files

OPNSense/src 71611d3sys/net80211 ieee80211_hwmp.c ieee80211_ht.c

net80211: Use proper prototype for SYSINIT functions

MFC after:      1 week

(cherry picked from commit 7449e59110b8abbb3d647c3565ca3de1d21b2c84)
(cherry picked from commit 0270d3dfa75a462019d7d8555c4249b3e8790604)
DeltaFile
+1-1sys/net80211/ieee80211_hwmp.c
+1-1sys/net80211/ieee80211_ht.c
+1-1sys/net80211/ieee80211_mesh.c
+1-1sys/net80211/ieee80211_phy.c
+1-1sys/net80211/ieee80211_proto.c
+1-1sys/net80211/ieee80211_vht.c
+6-66 files

OPNSense/src 3bf7558sys/net route.c rtsock.c, sys/net/route route_tables.c

net: Use proper prototype for SYSINIT functions

MFC after:      1 week

(cherry picked from commit 6f8259eae61981d7e5d049be7eed9235f0e8172e)
(cherry picked from commit fa80382b99f934ab46b9365d1081c6425ed58026)
DeltaFile
+1-1sys/net/route.c
+1-1sys/net/route/route_tables.c
+1-1sys/net/rtsock.c
+3-33 files

OPNSense/src c760cc4sys/fs/p9fs p9_transport.c

p9fs: Use proper prototype for SYSINIT functions

MFC after:      1 week

(cherry picked from commit 11cfa861e3ff83649c54e5781b541166dc73e80b)
(cherry picked from commit 618c7cffeb28a89475ee001827e53049e45715ed)
DeltaFile
+1-2sys/fs/p9fs/p9_transport.c
+1-21 files

OPNSense/src 0b3951asys/net sff8436.h

sys/net/sff8436.h: Fix the register address of link length of copper or active cable

The register address of link length of copper or active cable is 146 as
per the SFF-8436 specification [1].

[1] 7.6.2 Upper Memory Map Page 00h SFF-8436 Specification (pdf): https://members.snia.org/document/dl/25896

Reviewed by:    imp, zlei
MFC after:      1 week
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1885
Closes:         https://github.com/freebsd/freebsd-src/pull/1885

(cherry picked from commit a537694b49f719d84e3a69a2b8a3098f603da7d7)
(cherry picked from commit fdd23fc3d0aacd1c80d0565d736591521b2421fc)
DeltaFile
+1-1sys/net/sff8436.h
+1-11 files

OPNSense/src 78c3994sys/net if_ovpn.c, tests/sys/net/if_ovpn if_ovpn.sh

if_ovpn: add interface counters

Count input/output packets and bytes on the interface as well, not just
in openvpn-specific counters.

PR:             292464
MFC after:      2 weeks
Sponsored by:   Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 21d666a19331f31fb6dfa1e370de5a84a1a5cb46)
DeltaFile
+32-0sys/net/if_ovpn.c
+25-0tests/sys/net/if_ovpn/if_ovpn.sh
+57-02 files

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

vtnet: improve consistency

Use sbuf_new_for_sysctl() instead of sbuf_new_auto() when exposing
the flags via sysctl.

(cherry picked from commit 8da838ac31692e381adfc63d83ea49f2adabbf23)
DeltaFile
+6-8sys/dev/virtio/network/if_vtnet.c
+6-81 files

OPNSense/src eddf2a1share/man/man4 vtnet.4, sys/dev/virtio/network if_vtnet.c virtio_net.h

vtnet: expose features via sysctl tree

Right now the 64-bit flags field needs to be casted to a 32-bit field,
because clang warns if more than 32-bits are used.
Once clang is fixed, this restriction will be removed and more bits
will be added.

Reviewed by:            markj, Timo Völker
Differential Revision:  https://reviews.freebsd.org/D54288

(cherry picked from commit 634d9c0d111b630c3d63a1cf25d15c32a37afab8)
DeltaFile
+18-0sys/dev/virtio/network/if_vtnet.c
+8-0sys/dev/virtio/network/virtio_net.h
+3-1share/man/man4/vtnet.4
+29-13 files

OPNSense/src 60b7f98share/man/man4 vtnet.4

vtnet.4: put each sentence on its own line

Reported by:    ziaee
Fixes:          e3a0571ad74d ("vtnet: expose flags via sysctl tree")

(cherry picked from commit f6e183301851e3e826d53a29e76cfc9bc7626477)
DeltaFile
+2-1share/man/man4/vtnet.4
+2-11 files

OPNSense/src 89de4d0share/man/man4 vtnet.4, sys/dev/virtio/network if_vtnet.c if_vtnetvar.h

vtnet: expose flags via sysctl tree

Provide the flags used for a vtnet interface via the sysctl tree.
This is mostly used for debugging purposes.

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

(cherry picked from commit e3a0571ad74d8429a95fcae9efc1d91cc109a337)
DeltaFile
+20-0sys/dev/virtio/network/if_vtnet.c
+5-0sys/dev/virtio/network/if_vtnetvar.h
+3-1share/man/man4/vtnet.4
+28-13 files

OPNSense/src 1023411sys/dev/virtio/network virtio_net.h

vtnet: define flags in a consistent way

This allows adding flags in the upper 32 bits in a consistent way.
No functional change intended.

(cherry picked from commit e0c6c4ecfc755b78ac9135033053d2f15c62bf04)
DeltaFile
+23-23sys/dev/virtio/network/virtio_net.h
+23-231 files