<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/netinet6/send.c, branch stable/14</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>sys: Remove $FreeBSD$: one-line .c pattern</title>
<updated>2023-08-16T17:54:36+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:54:36+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=685dc743dc3b5645e34836464128e1c0558b404b'/>
<id>685dc743dc3b5645e34836464128e1c0558b404b</id>
<content type='text'>
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
</pre>
</div>
</content>
</entry>
<entry>
<title>spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD</title>
<updated>2023-05-12T16:44:03+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-05-10T15:40:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=4d846d260e2b9a3d4d0a701462568268cbfe7a5b'/>
<id>4d846d260e2b9a3d4d0a701462568268cbfe7a5b</id>
<content type='text'>
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix
</pre>
</div>
</content>
</entry>
<entry>
<title>IfAPI: Explicitly include &lt;net/if_private.h&gt; in netstack</title>
<updated>2023-01-31T20:02:16+00:00</updated>
<author>
<name>Justin Hibbits</name>
<email>jhibbits@FreeBSD.org</email>
</author>
<published>2023-01-23T15:05:29+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=3d0d5b21c9b2cfd7e48209340a090f63ca4bce03'/>
<id>3d0d5b21c9b2cfd7e48209340a090f63ca4bce03</id>
<content type='text'>
Summary:
In preparation of making if_t completely opaque outside of the netstack,
explicitly include the header.  &lt;net/if_var.h&gt; will stop including the
header in the future.

Sponsored by:	Juniper Networks, Inc.
Reviewed by:	glebius, melifaro
Differential Revision: https://reviews.freebsd.org/D38200
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Summary:
In preparation of making if_t completely opaque outside of the netstack,
explicitly include the header.  &lt;net/if_var.h&gt; will stop including the
header in the future.

Sponsored by:	Juniper Networks, Inc.
Reviewed by:	glebius, melifaro
Differential Revision: https://reviews.freebsd.org/D38200
</pre>
</div>
</content>
</entry>
<entry>
<title>protosw: refactor protosw and domain static declaration and load</title>
<updated>2022-08-17T18:50:32+00:00</updated>
<author>
<name>Gleb Smirnoff</name>
<email>glebius@FreeBSD.org</email>
</author>
<published>2022-08-17T18:50:32+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e7d02be19d40063783d6b8f1ff2bc4c7170fd434'/>
<id>e7d02be19d40063783d6b8f1ff2bc4c7170fd434</id>
<content type='text'>
o Assert that every protosw has pr_attach.  Now this structure is
  only for socket protocols declarations and nothing else.
o Merge struct pr_usrreqs into struct protosw.  This was suggested
  in 1996 by wollman@ (see 7b187005d18ef), and later reiterated
  in 2006 by rwatson@ (see 6fbb9cf860dcd).
o Make struct domain hold a variable sized array of protosw pointers.
  For most protocols these pointers are initialized statically.
  Those domains that may have loadable protocols have spacers. IPv4
  and IPv6 have 8 spacers each (andre@ dff3237ee54ea).
o For inetsw and inet6sw leave a comment noting that many protosw
  entries very likely are dead code.
o Refactor pf_proto_[un]register() into protosw_[un]register().
o Isolate pr_*_notsupp() methods into uipc_domain.c

Reviewed by:		melifaro
Differential revision:	https://reviews.freebsd.org/D36232
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
o Assert that every protosw has pr_attach.  Now this structure is
  only for socket protocols declarations and nothing else.
o Merge struct pr_usrreqs into struct protosw.  This was suggested
  in 1996 by wollman@ (see 7b187005d18ef), and later reiterated
  in 2006 by rwatson@ (see 6fbb9cf860dcd).
o Make struct domain hold a variable sized array of protosw pointers.
  For most protocols these pointers are initialized statically.
  Those domains that may have loadable protocols have spacers. IPv4
  and IPv6 have 8 spacers each (andre@ dff3237ee54ea).
o For inetsw and inet6sw leave a comment noting that many protosw
  entries very likely are dead code.
o Refactor pf_proto_[un]register() into protosw_[un]register().
o Isolate pr_*_notsupp() methods into uipc_domain.c

Reviewed by:		melifaro
Differential revision:	https://reviews.freebsd.org/D36232
</pre>
</div>
</content>
</entry>
<entry>
<title>socket: Implement SO_RERROR</title>
<updated>2021-07-28T16:35:09+00:00</updated>
<author>
<name>Roy Marples</name>
<email>roy@marples.name</email>
</author>
<published>2021-07-28T15:46:59+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=7045b1603bdf054145dd958a4acc17b410fb62a0'/>
<id>7045b1603bdf054145dd958a4acc17b410fb62a0</id>
<content type='text'>
SO_RERROR indicates that receive buffer overflows should be handled as
errors. Historically receive buffer overflows have been ignored and
programs could not tell if they missed messages or messages had been
truncated because of overflows. Since programs historically do not
expect to get receive overflow errors, this behavior is not the
default.

This is really really important for programs that use route(4) to keep
in sync with the system. If we loose a message then we need to reload
the full system state, otherwise the behaviour from that point is
undefined and can lead to chasing bogus bug reports.

Reviewed by:	philip (network), kbowling (transport), gbe (manpages)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D26652
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
SO_RERROR indicates that receive buffer overflows should be handled as
errors. Historically receive buffer overflows have been ignored and
programs could not tell if they missed messages or messages had been
truncated because of overflows. Since programs historically do not
expect to get receive overflow errors, this behavior is not the
default.

This is really really important for programs that use route(4) to keep
in sync with the system. If we loose a message then we need to reload
the full system state, otherwise the behaviour from that point is
undefined and can lead to chasing bogus bug reports.

Reviewed by:	philip (network), kbowling (transport), gbe (manpages)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D26652
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix mbuf leaks in various pru_send implementations</title>
<updated>2021-05-12T17:00:09+00:00</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2021-05-12T13:39:36+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=d8acd2681bcfb2ff7eb154df82f268b1cb191b4c'/>
<id>d8acd2681bcfb2ff7eb154df82f268b1cb191b4c</id>
<content type='text'>
The various protocol implementations are not very consistent about
freeing mbufs in error paths.  In general, all protocols must free both
"m" and "control" upon an error, except if PRUS_NOTREADY is specified
(this is only implemented by TCP and unix(4) and requires further work
not handled in this diff), in which case "control" still must be freed.

This diff plugs various leaks in the pru_send implementations.

Reviewed by:	tuexen
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D30151
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The various protocol implementations are not very consistent about
freeing mbufs in error paths.  In general, all protocols must free both
"m" and "control" upon an error, except if PRUS_NOTREADY is specified
(this is only implemented by TCP and unix(4) and requires further work
not handled in this diff), in which case "control" still must be freed.

This diff plugs various leaks in the pru_send implementations.

Reviewed by:	tuexen
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D30151
</pre>
</div>
</content>
</entry>
<entry>
<title>Add missing sockaddr length and family validation to various protocols</title>
<updated>2021-05-03T17:35:19+00:00</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2021-05-03T16:51:04+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=f161d294b92732df6254a89f393ab24999e122bf'/>
<id>f161d294b92732df6254a89f393ab24999e122bf</id>
<content type='text'>
Several protocol methods take a sockaddr as input.  In some cases the
sockaddr lengths were not being validated, or were validated after some
out-of-bounds accesses could occur.  Add requisite checking to various
protocol entry points, and convert some existing checks to assertions
where appropriate.

Reported by:	syzkaller+KASAN
Reviewed by:	tuexen, melifaro
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D29519
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Several protocol methods take a sockaddr as input.  In some cases the
sockaddr lengths were not being validated, or were validated after some
out-of-bounds accesses could occur.  Add requisite checking to various
protocol entry points, and convert some existing checks to assertions
where appropriate.

Reported by:	syzkaller+KASAN
Reviewed by:	tuexen, melifaro
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D29519
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove per-packet ifa refcounting from IPv6 fast path.</title>
<updated>2021-02-15T22:33:12+00:00</updated>
<author>
<name>Alexander V. Chernikov</name>
<email>melifaro@FreeBSD.org</email>
</author>
<published>2021-02-15T21:59:21+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=8268d82cff1bcd7969e5b3c676f28684784a7a43'/>
<id>8268d82cff1bcd7969e5b3c676f28684784a7a43</id>
<content type='text'>
Currently ip6_input() calls in6ifa_ifwithaddr() for
 every local packet, in order to check if the target ip
 belongs to the local ifa in proper state and increase
 its counters.

in6ifa_ifwithaddr() references found ifa.
With epoch changes, both `ip6_input()` and all other current callers
 of `in6ifa_ifwithaddr()` do not need this reference
 anymore, as epoch provides stability guarantee.

Given that, update `in6ifa_ifwithaddr()` to allow
 it to return ifa without referencing it, while preserving
 option for getting referenced ifa if so desired.

MFC after:		1 week
Differential Revision:	https://reviews.freebsd.org/D28648
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently ip6_input() calls in6ifa_ifwithaddr() for
 every local packet, in order to check if the target ip
 belongs to the local ifa in proper state and increase
 its counters.

in6ifa_ifwithaddr() references found ifa.
With epoch changes, both `ip6_input()` and all other current callers
 of `in6ifa_ifwithaddr()` do not need this reference
 anymore, as epoch provides stability guarantee.

Given that, update `in6ifa_ifwithaddr()` to allow
 it to return ifa without referencing it, while preserving
 option for getting referenced ifa if so desired.

MFC after:		1 week
Differential Revision:	https://reviews.freebsd.org/D28648
</pre>
</div>
</content>
</entry>
<entry>
<title>Enforce net epoch in in6_selectsrc().</title>
<updated>2021-02-15T22:33:12+00:00</updated>
<author>
<name>Alexander V. Chernikov</name>
<email>melifaro@FreeBSD.org</email>
</author>
<published>2021-02-13T14:32:10+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=605284b894748d23136b30a202689493d8f8af52'/>
<id>605284b894748d23136b30a202689493d8f8af52</id>
<content type='text'>
in6_selectsrc() may call fib6_lookup() in some cases, which requires
 epoch. Wrap in6_selectsrc* calls into epoch inside its users.
Mark it as requiring epoch by adding NET_EPOCH_ASSERT().

MFC after:	1 weeek
Differential Revision:	https://reviews.freebsd.org/D28647
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
in6_selectsrc() may call fib6_lookup() in some cases, which requires
 epoch. Wrap in6_selectsrc* calls into epoch inside its users.
Mark it as requiring epoch by adding NET_EPOCH_ASSERT().

MFC after:	1 weeek
Differential Revision:	https://reviews.freebsd.org/D28647
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "SO_RERROR indicates that receive buffer overflows should be handled as errors."</title>
<updated>2021-02-08T22:32:32+00:00</updated>
<author>
<name>Alexander V. Chernikov</name>
<email>melifaro@FreeBSD.org</email>
</author>
<published>2021-02-08T22:30:39+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=924d1c9a050d7e355d0562fca62bd2bb9b5f53d7'/>
<id>924d1c9a050d7e355d0562fca62bd2bb9b5f53d7</id>
<content type='text'>
Wrong version of the change was pushed inadvertenly.

This reverts commit 4a01b854ca5c2e5124958363b3326708b913af71.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Wrong version of the change was pushed inadvertenly.

This reverts commit 4a01b854ca5c2e5124958363b3326708b913af71.
</pre>
</div>
</content>
</entry>
</feed>
