Commit graph

5454 commits

Author SHA1 Message Date
Andrey V. Elsukov
f2644d64b4 routing: set net.route.multipath=0 when kernel doesn't have ROUTE_MPATH
MFC after:	1 week
2025-02-28 17:05:47 +03:00
Kajetan Staszkiewicz
f6f116cdbd pf: Make af-to work on outbound interface
Currently af-to works only on inbound interface by creating a reversed
NAT state key which is used to match traffic returning on the outbound
interface.

Such limitation is not necessary. When an af-to state is created
for an outbound rule do not reverse the NAT state key, making it work
just like if it was created for a normal NAT rule. Depending on firewall
design it might be easier and more natural to use af-to on the outbound
interface.

Reviewed by:		kp
Approved by:		kp (mentor)
Sponsored by:		InnoGames GmbH
Differential Revision:	https://reviews.freebsd.org/D49122
2025-02-27 16:28:27 +01:00
SHENGYI HONG
c040011f07 ifdi: fix signature mismatch for null_priv_ioctl
Reviewed by:	jhb
Differential Revision: https://reviews.freebsd.org/D49110
2025-02-25 09:21:51 -05:00
Nicholas Dance
8d079c6a9a if_infininband: Support BPF write for broadcast frames
To support DHCP for IPoIB links, DHCP clients and servers require the
ability to transmit link-layer broadcasts on the IB interfaces. BPF
provides the mechanism for doing this.

This change updates the if_infiniband driver to be capable of accepting
link-layer broadcast requests via BPF using Ethernet formatted frames
(the driver currently registers with BPF as DLT_EN10MB). Only Broadcast
frames can reliably be interpreted using the Ethernet header format so
detect unicast and multicast frames are rejected if passed in using the
Ethernet format. This doesn't impact the ability to support native
unicast, broadcast or multicast frames if native infiniband header
support is added to BPF at a later date.

Further the above, this commit also addresses an issue in the existing
code that can result in separation of part of the packet header from the
rest of the payload if a BPF write was attempted. This was caused by
mbuf preallocation of the infiniband header length regardless of length
of the prepend data.

Reviewed by:	rpokala; Greg Foster <gfoster@vdura.com>
Tested by:	Greg Foster <gfoster@vdura.com>
MFC after:	1 week
Sponsored by:	Vdura
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1591
2025-02-23 16:13:09 -08:00
Kristof Provost
1ba1e152f8 pf: make log(matches) more useful
change log(matches) semantics slightly to make it more useful. since it
is a debug tool change of semantics not considered problematic.
up until now, log(matches) forced logging on subsequent matching rules,
the actual logging used the log settings from that matched rule.
now, log(matches) causes subsequent matches to be logged with the log settings
from the log(matches) rule. in particular (this was the driving point),
log(matches, to pflog23) allows you to have the trace log going to a seperate
pflog interface, not clobbering your regular pflogs, actually not affecting
them at all.
long conversation with bluhm about it, which didn't lead to a single bit
changed in the diff but was very very helpful. ok bluhm as well.

Obtained from:	OpenBSD, henning <henning@openbsd.org>, f61b1efcce
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-02-21 09:11:03 +01:00
Kristof Provost
d2bb19883f pf: introduce a way to match "any" interface, excluding loopback ones
pfi_kkif_attach() annotates the kif with a flag indicating it is the "any" match.
pfi_kif_match obeys() that flag.

ok benno

Obtained from:	OpenBSD, henning <henning@openbsd.org>, 4be478ce5d
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-02-14 18:47:52 +01:00
Kristof Provost
7e7f88001d pf: use time_t for storing time_t values
No change to the underlying type, so no ABI change.

We define __time_t as uint64_t if __LP64__, otherwise uint32_t,
and only define __LP64__ if long is 64 bits.
In other words: __time_t == long.

ok henning@ deraadt@

Obtained from:	OpenBSD, guenther <guenther@openbsd.org>, 6c1b69a0ff
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D48963
2025-02-14 18:47:52 +01:00
Kajetan Staszkiewicz
07e070ef08 pf: Add support for multiple source node types
For every state pf creates up to two source nodes: a limiting one
struct pf_kstate -> src_node and a NAT one struct pf_kstate -> nat_src_node.
The limiting source node is tracking information needed for limits using
max-src-states and max-src-nodes and the NAT source node is tracking NAT
rules only.

On closer inspection some issues emerge:
- For route-to rules the redirection decision is stored in the limiting source
  node. Thus sticky-address and source limiting can't be used separately.
- Global source tracking, as promised in the man page, is totally absent from
  the code. Pfctl is capable of setting flags PFRULE_SRCTRACK (enable source
  tracking) and PFRULE_RULESRCTRACK (make source tracking per rule). The kernel
  code checks PFRULE_SRCTRACK but ignores PFRULE_RULESRCTRACK. That makes
  source tracking work per-rule only.

This patch is based on OpenBSD approach where source nodes have a type and each
state has an array of source node pointers indexed by source node type
instead of just two pointers. The conditions for limiting are applied
only to source nodes of PF_SN_LIMIT type. For global limit tracking
source nodes are attached to the default rule.

Reviewed by:		kp
Approved by:		kp (mentor)
Sponsored by:		InnoGames GmbH
Differential Revision:	https://reviews.freebsd.org/D39880
2025-02-13 15:59:12 +01:00
Kristof Provost
67c19da08f pf: support negated matches on the rcvif
ok dlg benno

Obtained from:	OpenBSD, henning <henning@openbsd.org>, 08c03b768d
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-02-13 13:38:44 +01:00
Kristof Provost
f3e8653bad pf: fold pf_test_state_sctp into pf_test_state as well
Just like TCP and UDP we can fold the SCTP code into pf_test_state().
This does require a dummy variable to hold the protocol checksum, because unlike
TCP and UDP the SCTP checksum is 32-bits. We don't need to change the checksum
though, so simply pointing the pcksum pointer to a safe dummy location suffices
to re-use pf_test_state().

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-02-12 20:38:38 +01:00
Kristof Provost
c56650fd79 pf: add a pointer to the protocol checksum header field to pf_pdesc
Set it up in pf_setup_pdesc(). ok ryan benno mikeb bluhm

Obtained from:	OpenBSD, henning <henning@openbsd.org>, 14255d4d87
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-02-12 20:38:38 +01:00
Kristof Provost
30ab6e823c pf: fix anchor quick with nested anchors
We lost the quick flag as soon as we stepped into a child anchor.
Simplify the logic, get rid of the match flag in the anchor stack, just
use the match variable we already had (and used in a boolean style) to track
the nest level we had a match at. When a child anchor had a match we also
have a match in the current anchor, so update the match level accordingly,
and thus correctly honour the quick flag.
Reported by, along with the right idea on how to fix this, by Sean Gallagher
\sean at teletech.com.au/, who also helped testing the fix. ok ryan & benno

Obtained from:	OpenBSD, henning <henning@openbsd.org>, 32a028bff7
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-02-12 09:29:09 +01:00
Kevin Bowling
7835a4ad69 net: if_media fix syntax/build
Fixes:		d82c3e815a ("net: if_media for 100BASE-BX")
MFC after:	3 days
2025-02-08 17:10:27 -07:00
Kevin Bowling
d82c3e815a net: if_media for 100BASE-BX
Renumber 1000BASE-BX and add 100BASE-BX sequentially

I added this 1000BASE-BX in 78c63ed260 but
did not connect it to any code yet, appologize for the churn.

MFC after:	3 days
2025-02-08 16:49:46 -07:00
Zhenlei Huang
d8413a1c3b ifnet: Fix build without BPF
The newly introduced function bpf_ifdetach() is only available when
device bpf is enabled.

Fixes:	1ed9b381d4 ifnet: Detach BPF descriptors on interface vmove event
2025-02-07 02:32:05 +08:00
Mark Johnston
7a66b30086 pf: Stop using net_epoch to synchronize access to eth rules
Commit 20c4899a8e modified pf_test_eth_rule() to not acquire the
rules read lock, so pf_commit_eth() was changed to wait until the
now-inactive rules are no longer in use before freeing them.  In
particular, it uses the net_epoch to schedule callbacks once the
inactive rules are no longer visible to packet processing threads.

However, since commit 812839e5aa, pf_test_eth_rule() acquires the
rules read lock, so this deferred action is unneeded.  This patch
reverts a portion of 20c4899a8e such that we avoid using deferred
callbacks to free inactive rules.

The main motivation is performance: epoch_drain_callbacks() is quite
slow, especially on busy systems, and its use in the DIOCXBEGIN handler
in particular causes long stalls in relayd when reloading configuration.

Reviewed by:	kp
MFC after:	2 weeks
Sponsored by:	Klara, Inc.
Sponsored by:	Modirum MDPay
Differential Revision:	https://reviews.freebsd.org/D48822
2025-02-06 16:25:42 +00:00
Mark Johnston
caccbaef8e socket: Move SO_SETFIB handling to protocol layers
In particular, we store a FIB number in both struct socket and in struct
inpcb.  When updating the FIB number with setsockopt(SO_SETFIB), make
the update atomic.  This is required to support the new bind_all_fibs
mode, since in that mode changing the FIB of a bound socket is not
permitted.

This requires a bit more code, but avoids a layering violation in
sosetopt(), where we hard-code the list of protocol families that
implement SO_SETFIB.

Reviewed by:	glebius
MFC after:	2 weeks
Sponsored by:	Klara, Inc.
Sponsored by:	Stormshield
Differential Revision:	https://reviews.freebsd.org/D48666
2025-02-06 14:16:21 +00:00
Kristof Provost
0078c109b8 pf: remove stale XXX
remove confuzzling comment
:dlg: the xxx can go
...and this time commit to the real repo and not the one on my laptop

Obtained from:	OpenBSD, henning <henning@openbsd.org>, 15e15606eb
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-02-06 15:00:05 +01:00
Kristof Provost
fffedd81a4 pf: send ICMP destination unreachable fragmentation needed when appropriate
Just like we do for IPv6, generate an ICMP fragmentation needed packet if we're
going to need fragmenation for IPv4 as well (i.e. DF is set). Do so before full
processing, so we generate it with pre-NAT addreses, just as we do for IPv6.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D48805
2025-02-04 21:56:06 +01:00
Zhenlei Huang
1ed9b381d4 ifnet: Detach BPF descriptors on interface vmove event
When an interface is moving to/from a vnet jail, it may still have BPF
descriptors attached. The userland (e.g. tcpdump) does not get noticed
that the interface is departing and still opens BPF descriptors thus
may result in leaking sensitive traffic (e.g. an interface is moved
back to parent jail but a user is still sniffing traffic over it in
the child jail).

Detach BPF descriptors so that the userland will be signaled.

Reviewed by:	ae
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D45727
2025-02-04 23:04:59 +08:00
Zhenlei Huang
bb0348a179 ifnet: Make if_detach_internal() and if_vmove() void
if_detach_internal() never fail since change [1]. As a consequence,
also does its caller if_vmove(). While here, remove a stall comment.

No functional change intended.

This reverts commit c7bab2a7ca.

[1] a779388f8b if: Protect V_ifnet in vnet_if_return()

Reviewed by:	glebius
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D48820
2025-02-04 23:04:59 +08:00
Zhenlei Huang
7def047a1a bpf: Fix potential race conditions
There're two possible race conditions,

1. Concurrent bpfattach() and bpf_setif(), i.e., BIOCSETIF ioctl,
2. Concurrent bpfdetach() and bpf_setif().

For the first case, userland may see BPF interface attached but it has
not been in the attached interfaces list `bpf_iflist` yet. Well it
will eventually be so this case does not matter.

For the second one, bpf_setif() may reference `dead_bpf_if` and the
kernel will panic (spotted by change [1], without the change we will
end up silently corrupted memory).

A simple fix could be that, we add additional check for `dead_bpf_if`
in the function `bpf_setif()`. But that requires to extend protection
of global lock (BPF_LOCK), i.e., BPF_LOCK should also protect the
assignment of `ifp->if_bpf`. That simple fix works but is apparently
not a good design. Since the attached interfaces list `bpf_iflist` is
the single source of truth, we look through it rather than check
against the interface's side, aka `ifp->if_bpf`.

This change has performance regression, that the cost of BPF interface
attach operation (BIOCSETIF ioctl) goes back from O(1) to O(N) (where
N is the number of BPF interfaces). Well we normally have sane amounts
of interfaces, an O(N) should be affordable.

[1] 7a974a6498 bpf: Make dead_bpf_if const

Fixes:		16d878cc99 Fix the following bpf(4) race condition ...
MFC after:	4 days
Differential Revision:	https://reviews.freebsd.org/D45725
2025-02-03 20:13:19 +08:00
Alfredo Mazzinghi
88b187401d iflib: Simplify CACHE_PTR_NEXT
Reviewed by:	Krzysztof Galazka <krzysztof.galazka@intel.com>
Obtained from:	CheriBSD
Sponsored by:	AFRL, DARPA
Differential Revision:	https://reviews.freebsd.org/D48446
2025-01-31 15:41:45 -05:00
Zhenlei Huang
903c7cdac5 vnet: Fix style nits
MFC after:	3 days
2025-01-30 23:59:35 +08:00
Kristof Provost
a55197c322 if_ovpn: fix module load in NOINET6 kernels
PR:		284459
MFC after:	2 weeks
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-01-30 12:07:15 +01:00
Zhenlei Huang
92632371b3 if_vxlan(4): Prefer SYSCTL_INT over TUNABLE_INT
This driver does not need to retrieve those tunable during early boot.
Meanwhile SYSCTL_INT can provide rich info such as description.
Also `sysctl net.link.vxlan.[legacy_port|reuse_port]` can report the
current settings.

MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D48621
2025-01-27 23:54:43 +08:00
Krzysztof Galazka
3ad01642fe iflib(4): Replace admin taskqueue group with per-interface taskqueues
Using one taskqueue group with single thread to execute all admin
tasks may lead to unexpected timeouts when long running task (e.g.
handling a reset after FW update) for one interface prevents
tasks from other interfaces being executed. Taskqueue group API
doesn't let to dynamically add threads, and pre-allocating thread
for each CPU as it's done for traffic queues would be a waste
of resources on systems with small number of interfaces. Replace
global taskqueue group for admin tasks with taskqueue allocated
for each interface to allow independent execution.

Signed-off-by: Krzysztof Galazka <krzysztof.galazka@intel.com>
Reviewed by: imp, jhb
Pull Request: https://github.com/freebsd/freebsd-src/pull/1336
2025-01-24 14:08:12 -07:00
Kristof Provost
3bf6554017 pf: remove PFLOGIFS_MAX
There was a limit on the number of pflog interfaces - 16. remove that.
mostly by dynamically allocating pflogifs instead of making that a static
array. ok claudio zinke

Obtained from:	OpenBSD, henning <henning@openbsd.org>, ab0a082ea6
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-01-24 11:20:31 +01:00
Kristof Provost
0972294ef0 pf: add a dedicated pf pool for route options
As suggested by henning.
Which unbreaks ie route-to after the recent pf changes.

With much help debugging and pointing out of missing bits from claudio@

ok claudio@ "looks good" henning@

Obtained from:	OpenBSD, jsg <jsg@openbsd.org>, 7fa5c09028
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-01-24 11:20:30 +01:00
Zhenlei Huang
5e0dbbc238 if_vxlan(4): Use static initializers
MFC after:	1 week
2025-01-24 17:37:24 +08:00
Zhenlei Huang
960c5bb0f6 if_vxlan(4): Invoke vxlan_stop event handler only when the interface is configured
It is harmless but pointless to invoke vxlan_stop event handler when the
interface was not previously configured. This change will also prevent
an assert panic from t4_vxlan_stop_handler().

Reviewed by:	kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D48494
2025-01-21 23:02:13 +08:00
Adrian Chadd
86bfbaf100 sys: add MBIM (mobile broadband interface module) interface type.
This is part of the upcoming USB umb(4) work.

Differential Revision:	https://reviews.freebsd.org/D48167
Approved by:	adrian, zlei
Sponsored by:	FreeBSD Foundation
PR:		kern/263783
Submitted by:	Pierre Pronchery <khorben@defora.org>
2025-01-20 23:39:17 +00:00
Kristof Provost
76e00c722b dummymbuf: add 'enlarge'
Teach dummymbuf to replace mbufs with larger ones.
This can be useful for testing for bugs that depend on mbuf layout.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-01-17 17:00:08 +01:00
Kristof Provost
5d28f4cab8 pf: clean up mbuf passing for reassembly
When we call pf_normalize_ip() or pf_normalize_ip6() we passed the mbuf twice.
Once as m0, and once inside the struct pf_pdesc. Remove the former to avoid
confusion when we free *m0, but don't update pd->m.

This could lead to use-after-free errors e.g. if reassembly failed.

PR:		283705
Reported by:	Yichen Chai <yichen.chai@gmail.com>, Zhuo Ying Jiang Li <zyj20@cl.cam.ac.uk>
MFC after:	3 days
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-01-17 17:00:08 +01:00
Kristof Provost
e4f2733df8 pf: add 'allow-related' to always allow SCTP multihome extra connections
Allow users to choose to allow permitted SCTP connections to set up additional
multihomed connections regardless of the ruleset. That is, allow an already
established connection to set up flows that would otherwise be disallowed.

In case of if-bound connections we initially set the extra associations to
be floating, because we don't know what path they'll be taking when they're
created. Once we see the first traffic we can bind them.

MFC after:	2 weeks
Sponsored by:	Orange Business Services
Differential Revision:	https://reviews.freebsd.org/D48453
2025-01-17 09:41:25 +01:00
Gleb Smirnoff
38d947b53c netisr: fix compilation without VIMAGE
- Don't use bare vnet(4) definitions in the KASSERT, they aren't available
  on a kernel without VIMAGE.  Just through MPASS() here.  This is more of
  documenting assertion rather than an assertion that may actually fire on
  an unmodified kernel.
- V_netisr_enable is different to the rest of V_ prefixed globals.  On a
  kernel without VIMAGE it basically doesn't exist, instead of being
  present as a single instance.

Fixes:	a1be7978f1
2025-01-16 20:32:53 -08:00
Gleb Smirnoff
a1be7978f1 netisr: avoid VNET recursion warning in netisr_register()
While here, move some assertions to the top of the function.
2025-01-16 18:31:15 -08:00
SHENGYI HONG
8be18c2d5a sys/net: fix several sysinit_cfunc_t signature mismatches
Reviewed by:	glebius
Differential Revision:	https://reviews.freebsd.org/D48490
2025-01-16 10:10:09 -08:00
Kristof Provost
1941d370bf pf: pass struct pf_pdesc to pf_walk_option6() and pf_walk_header6()
This makes their argument list shorter. Also fix a bug where pf_walk_option6()
used the outer header in the pd2 case.
ok henning@ mikeb@

Obtained from:	OpenBSD, bluhm <bluhm@openbsd.org>, dfff4707a1
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-01-14 09:54:19 +01:00
Konstantin Belousov
0ff2d00d2a ipsec: allow it to work with unmapped mbufs
Only map mbuf when a policy is looked up and indicates that IPSEC needs
to transform the packet.  If IPSEC is inline offloaded, it is up to the
interface driver to request remap if needed.

Fetch the IP header using m_copydata() instead of using mtod() to select
policy/SA.

Reviewed by:	markj
Sponsored by:	NVidia networking
Differential revision:	https://reviews.freebsd.org/D48265
2025-01-13 21:29:32 +02:00
Kristof Provost
07579e2110 pf: sprinkle const over function arguments
Document that these are not supposed to modify their arguments.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2024-12-30 21:42:13 +01:00
Kristof Provost
3624de5394 if_ovpn: improve reconnect handling
When a DCO client reconnects (e.g. on server restart) OpenVPN may create a new
socket rather than reusing the existing one. This used to be rejected because we
expect all peers to use the same socket. However, if there are no peers it's
safe to release the previous socket and install the tunnel function on the new
one.

See also:	https://redmine.pfsense.org/issues/15928
MFC after:	2 weeks
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2024-12-18 17:10:29 +01:00
Konstantin Belousov
c7d13682a1 lagg: do not advertize support for ipsec offload
It is not implemented, and most likely cannot be, in a robust manner.

Reviewed by:	Ariel Ehrenberg <aehrenberg@nvidia.com>, slavash
Sponsored by:	NVidia networking
2024-12-17 23:49:31 +02:00
Kristof Provost
7cae58a449 pf: handle fragmentation for nat64
When we reassemble IPv4 packets tag them just like we tag the IPv6 reassembled
packtes. Use this information as the basis for refragmenting the IPv6 packet.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D47804
2024-12-17 11:07:16 +01:00
Kristof Provost
aa69fdf154 pfctl: change for af-to / NAT64 support.
The general syntax is:
pass in inet from any to 192.168.1.1 af-to inet6 from 2001::1 to 2001::2
In the NAT64 case the "to" is not needed in af-to and the IP is extraced
from the IPv6 dst (assuming a /64 prefix).
Again most work by sperreault@, mikeb@ and reyk@
OK mcbride@, put it in deraadt@

Obtained from:	OpenBSD, claudio <claudio@openbsd.org>, 0cde32ce3f
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D47790
2024-12-17 11:07:13 +01:00
Kristof Provost
fcdb520c1b pf: nat64
Since the IPv6 madness is not enough introduce NAT64 -- which is actually
"af-to" a generic IP version translator for pf(4).
Not everything perfect yet but lets fix these things in the tree.
Insane amount of work done by sperreault@, mikeb@ and reyk@.
Looked over by mcbride@ henning@ and myself at eurobsdcon.
OK mcbride@ and general put it in from deraadt@

Obtained from:	OpenBSD, claudio <claudio@openbsd.org>, 97326e01c9
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D47786
2024-12-17 11:07:12 +01:00
Kristof Provost
2d7e68d5cd pf: add post-NAT src/dst address/port to pf_pdesc
stuff nsaddr/ndaddr/nsport/ndport (addrs/ports after NAT, used a lot while
walking the ruleset and up until state is fully set up) into pf_pdesc instead
of passing around those 4 seperately all the time, also shrinks the argument
count for a few functions that have/partialy had an insane count of arguments.
kinda preparational since we'll need them elsewhere too, soon
ok ryan jsing

Obtained from:	OpenBSD, henning <henning@openbsd.org>, ccf63ac6cb
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D47784
2024-12-17 11:07:12 +01:00
Kristof Provost
e11dacbf84 pf: partially import OpenBSD's NAT rewrite
We won't follow this fully, because it involves breaking syntax changes
(removing nat/rdr rules and moving this functionality into regular rules) as
well as behaviour changes because NAT is now done after the rules evaluation,
rather than before it.

We import some related changes anyway, because it paves the way for nat64
support.
This change introduces a new pf_kpool in struct pf_krule, for nat. It is not yet
used (but will be for nat64) and renames the existing 'rpool' to 'rdr'.

Obtained from:	OpenBSD, henning <henning@openbsd.org>, 0ef3d4febe
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D47783
2024-12-17 11:07:12 +01:00
Kristof Provost
85570785b9 pf: remove unused variable from pf_pdesc
We only every assigned proto_sum, never used it.
Remove it entirely.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2024-12-16 23:33:56 +01:00
Zhenlei Huang
adc573c8e2 rtsock: Use NULL for VNET_SYS[UN]INIT's last arg, which is a pointer type
MFC after:	3 days
2024-12-10 01:14:08 +08:00