<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/netinet/udp_usrreq.c, branch stable/14</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>udp: Wrap a long line in udp_send()</title>
<updated>2026-07-14T14:08:41+00:00</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2026-06-15T15:57:01+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=32ae329ac9c24109ec71969deaa00fdb39705844'/>
<id>32ae329ac9c24109ec71969deaa00fdb39705844</id>
<content type='text'>
No functional change intended.

MFC after:	1 week

(cherry picked from commit 3b69c7201fd06b368090f2ee3840d384a949cba8)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
No functional change intended.

MFC after:	1 week

(cherry picked from commit 3b69c7201fd06b368090f2ee3840d384a949cba8)
</pre>
</div>
</content>
</entry>
<entry>
<title>udp: honor IPV6_TCLASS cmsg for UDP/IPv4 packets</title>
<updated>2025-10-31T14:12:22+00:00</updated>
<author>
<name>Michael Tuexen</name>
<email>tuexen@FreeBSD.org</email>
</author>
<published>2025-10-26T17:58:15+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=984a58c13166f9fffe1c7b03d89e3f3d790d07cb'/>
<id>984a58c13166f9fffe1c7b03d89e3f3d790d07cb</id>
<content type='text'>
Honor the IPPROTO_IPV6-level cmsg of type IPV6_TCLASS when sending
an UDP/IPv4 packet on an AF_INET6 socket.

Reviewed by:		bz
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D53347

(cherry picked from commit d3a3854fdc6e8da3bc6c1c13aab8d371445d2914)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Honor the IPPROTO_IPV6-level cmsg of type IPV6_TCLASS when sending
an UDP/IPv4 packet on an AF_INET6 socket.

Reviewed by:		bz
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D53347

(cherry picked from commit d3a3854fdc6e8da3bc6c1c13aab8d371445d2914)
</pre>
</div>
</content>
</entry>
<entry>
<title>udp: honor IPV6_TCLASS socket option for UDP/IPv4 packets</title>
<updated>2025-10-31T14:11:40+00:00</updated>
<author>
<name>Michael Tuexen</name>
<email>tuexen@FreeBSD.org</email>
</author>
<published>2025-10-26T17:52:33+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=3aa6981e658b84aa0fee879697ae69b70f8c8f9d'/>
<id>3aa6981e658b84aa0fee879697ae69b70f8c8f9d</id>
<content type='text'>
Honor the IPPROTO_IPV6-level socket option IPV6_TCLASS when sending
an UDP/IPv4 packet on an AF_INET6 socket.

Reviewed by:		bz, glebius
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D53346

(cherry picked from commit 3535546a86846ddb0ca5fe4a0689ac635b504459)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Honor the IPPROTO_IPV6-level socket option IPV6_TCLASS when sending
an UDP/IPv4 packet on an AF_INET6 socket.

Reviewed by:		bz, glebius
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D53346

(cherry picked from commit 3535546a86846ddb0ca5fe4a0689ac635b504459)
</pre>
</div>
</content>
</entry>
<entry>
<title>UDP-Lite: export pcblist via sysctl interface</title>
<updated>2025-10-31T13:41:22+00:00</updated>
<author>
<name>Michael Tuexen</name>
<email>tuexen@FreeBSD.org</email>
</author>
<published>2025-10-23T07:10:03+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=63d9216a69681ce1f036206998a9f3d476451a04'/>
<id>63d9216a69681ce1f036206998a9f3d476451a04</id>
<content type='text'>
Export the list of pcbs for UDP-Lite to be consumed by sockstat and
netstat.

Reviewed by:		Peter Lei, Nick Banks
Differential Revision:	https://reviews.freebsd.org/D53229

(cherry picked from commit be93b27483680c7e741b1627cc96a131bc99436c)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Export the list of pcbs for UDP-Lite to be consumed by sockstat and
netstat.

Reviewed by:		Peter Lei, Nick Banks
Differential Revision:	https://reviews.freebsd.org/D53229

(cherry picked from commit be93b27483680c7e741b1627cc96a131bc99436c)
</pre>
</div>
</content>
</entry>
<entry>
<title>UDP: let udp_pcblist() support UDP and UDP-Lite</title>
<updated>2025-10-23T11:20:29+00:00</updated>
<author>
<name>Michael Tuexen</name>
<email>tuexen@FreeBSD.org</email>
</author>
<published>2025-10-20T21:21:47+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=218b164aef21de718bc3b4fb68ac4c4b57b40cab'/>
<id>218b164aef21de718bc3b4fb68ac4c4b57b40cab</id>
<content type='text'>
Provide the IPPROTO_UDP in the arg2 parameter of udp_pcblist() and use
this to determine the inpcbinfo. This allows the same function to be
used in an upcoming commit to provide the list of pcbs for UDP-Lite
just by providing IPPROTO_UDPLITE in the arg2 parameter.

Reviewed by:		rrs
Differential Revision:	https://reviews.freebsd.org/D53218

(cherry picked from commit be3c59ff508204dbab9e3616dc82ed7620f05d0c)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Provide the IPPROTO_UDP in the arg2 parameter of udp_pcblist() and use
this to determine the inpcbinfo. This allows the same function to be
used in an upcoming commit to provide the list of pcbs for UDP-Lite
just by providing IPPROTO_UDPLITE in the arg2 parameter.

Reviewed by:		rrs
Differential Revision:	https://reviews.freebsd.org/D53218

(cherry picked from commit be3c59ff508204dbab9e3616dc82ed7620f05d0c)
</pre>
</div>
</content>
</entry>
<entry>
<title>udp: use appropriate error counters</title>
<updated>2025-09-05T18:59:32+00:00</updated>
<author>
<name>Michael Tuexen</name>
<email>tuexen@FreeBSD.org</email>
</author>
<published>2025-08-12T12:24:20+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=9eb5c85c70fcfeeaab9d2d5410a566e16309ced1'/>
<id>9eb5c85c70fcfeeaab9d2d5410a566e16309ced1</id>
<content type='text'>
Since there are multicast and broadcast specific error counters,
use them.

Reviewed by:		rrs
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D51869

(cherry picked from commit 0312f80349eedfc2b0d2f24b4fd073795148d3d5)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since there are multicast and broadcast specific error counters,
use them.

Reviewed by:		rrs
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D51869

(cherry picked from commit 0312f80349eedfc2b0d2f24b4fd073795148d3d5)
</pre>
</div>
</content>
</entry>
<entry>
<title>sctp, tcp, udp: improve deferred computation of checksums</title>
<updated>2025-09-05T18:48:50+00:00</updated>
<author>
<name>Timo Völker</name>
<email>timo.voelker@fh-muenster.de</email>
</author>
<published>2025-08-01T10:09:47+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=dd8b6e2ce3fd3f208a8199ae89143953d4e4800c'/>
<id>dd8b6e2ce3fd3f208a8199ae89143953d4e4800c</id>
<content type='text'>
When the SCTP, TCP, or UDP implementation send a packet, it does not
compute the corresponding checksum but defers that. The network layer
will determine whether the network interface selected for the packet
has the requested capability and computes the checksum in software,
if the selected network interface doesn't have the requested
capability.
Do this not only for packets being sent by the local SCTP, TCP,
and UDP stack, but also when forwarding packets. Furthermore, when
such packets are delivered to a local SCTP, TCP, or UDP stack, do not
compute or validate the checksum, since such packets never have been on
the wire.
This allows to support checksum offloading also in the case of local
virtual machines or jails.
Support for epair, vtnet, and tap interfaces will be added in
separate commits.

Reviewed by:		kp, rgrimes, tuexen, manpages
Differential Revision:	https://reviews.freebsd.org/D51475

(cherry picked from commit bcb298fa9e23c1192c5707086a67d3b396186abc)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the SCTP, TCP, or UDP implementation send a packet, it does not
compute the corresponding checksum but defers that. The network layer
will determine whether the network interface selected for the packet
has the requested capability and computes the checksum in software,
if the selected network interface doesn't have the requested
capability.
Do this not only for packets being sent by the local SCTP, TCP,
and UDP stack, but also when forwarding packets. Furthermore, when
such packets are delivered to a local SCTP, TCP, or UDP stack, do not
compute or validate the checksum, since such packets never have been on
the wire.
This allows to support checksum offloading also in the case of local
virtual machines or jails.
Support for epair, vtnet, and tap interfaces will be added in
separate commits.

Reviewed by:		kp, rgrimes, tuexen, manpages
Differential Revision:	https://reviews.freebsd.org/D51475

(cherry picked from commit bcb298fa9e23c1192c5707086a67d3b396186abc)
</pre>
</div>
</content>
</entry>
<entry>
<title>udp: Fix a typo in a source code comment</title>
<updated>2025-08-20T06:57:17+00:00</updated>
<author>
<name>Gordon Bergling</name>
<email>gbe@FreeBSD.org</email>
</author>
<published>2025-08-17T09:26:44+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=3807e87f4eec6614d2e975f43a4f8308f3a4743a'/>
<id>3807e87f4eec6614d2e975f43a4f8308f3a4743a</id>
<content type='text'>
- s/datgram/datagram/

(cherry picked from commit a3a78bd7a7446a9a437391c681ba196d956987da)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- s/datgram/datagram/

(cherry picked from commit a3a78bd7a7446a9a437391c681ba196d956987da)
</pre>
</div>
</content>
</entry>
<entry>
<title>udp: Fix a inpcb refcount leak in the tunnel receive path</title>
<updated>2025-08-12T12:49:43+00:00</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2025-07-25T13:10:24+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=4d84cefbba2cad514d581d5dfaac7a2ac3ce2912'/>
<id>4d84cefbba2cad514d581d5dfaac7a2ac3ce2912</id>
<content type='text'>
When the socket has a tunneling function attached, udp_append() drops
the inpcb lock before calling it.  To keep the inpcb alive, we bump the
refcount.  After commit 742e7210d00b we only dropped the reference if
the tunnel consumed the packet, but it needs to be dropped in either
case.  if_ovpn is the only driver that can trigger this bug.

Fixes:		742e7210d00b ("udp: allow udp_tun_func_t() to indicate it did not eat the packet")
Reviewed by:	kp
MFC after:	2 weeks
Sponsored by:	Stormshield
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D51505

(cherry picked from commit e1751ef896119d7372035b1b60f18a6342bd0e3b)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the socket has a tunneling function attached, udp_append() drops
the inpcb lock before calling it.  To keep the inpcb alive, we bump the
refcount.  After commit 742e7210d00b we only dropped the reference if
the tunnel consumed the packet, but it needs to be dropped in either
case.  if_ovpn is the only driver that can trigger this bug.

Fixes:		742e7210d00b ("udp: allow udp_tun_func_t() to indicate it did not eat the packet")
Reviewed by:	kp
MFC after:	2 weeks
Sponsored by:	Stormshield
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D51505

(cherry picked from commit e1751ef896119d7372035b1b60f18a6342bd0e3b)
</pre>
</div>
</content>
</entry>
<entry>
<title>netinet: Fix getcred sysctl handlers to do nothing if no input is given</title>
<updated>2025-04-06T13:54:03+00:00</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2025-03-20T01:33:44+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=85ff908020d0169f9415852c7b63a4f15cac1294'/>
<id>85ff908020d0169f9415852c7b63a4f15cac1294</id>
<content type='text'>
These routines were all assuming that the sysctl handler has some new
value, but this is not the case.  SYSCTL_IN() returns 0 in this
scenario, so they were all operating on an uninitialized address.  This
is mostly harmless, but trips KMSAN checks, so let's fix them.

Reviewed by:	zlei, rrs, glebius
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D49348

(cherry picked from commit 3ff865c6a7948b2cfc01d7056c619145b696700a)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
These routines were all assuming that the sysctl handler has some new
value, but this is not the case.  SYSCTL_IN() returns 0 in this
scenario, so they were all operating on an uninitialized address.  This
is mostly harmless, but trips KMSAN checks, so let's fix them.

Reviewed by:	zlei, rrs, glebius
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D49348

(cherry picked from commit 3ff865c6a7948b2cfc01d7056c619145b696700a)
</pre>
</div>
</content>
</entry>
</feed>
