<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/source/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in socket_afinet.c</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>d3d0466cae546254c50c80cf3e0c060bbbbba53c - tests/socket_afinet: Fix the bind_connected_port test</title>
        <link>http://kernelsources.org:8080/source/history/freebsd/tests/sys/netinet/socket_afinet.c#d3d0466cae546254c50c80cf3e0c060bbbbba53c</link>
        <description>tests/socket_afinet: Fix the bind_connected_port testThe test verifies that a socket can bind to a local address assigned byconnect(2) to a different socket.  It was however trying to bind to thewrong address, and the check of the result was inverted, so this wentunnoticed.  It also needs to set SO_REUSEADDR for this to succeed.Reported by:	glebiusMFC after:	1 week

            List of files:
            /freebsd/tests/sys/netinet/socket_afinet.c</description>
        <pubDate>Mon, 20 Apr 2026 17:07:20 +0200</pubDate>
        <dc:creator>Mark Johnston &lt;markj@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>9f6041fb579106aa6fa358071a14eddabd581998 - tests/socket_afinet: Remove a conditional skip</title>
        <link>http://kernelsources.org:8080/source/history/freebsd/tests/sys/netinet/socket_afinet.c#9f6041fb579106aa6fa358071a14eddabd581998</link>
        <description>tests/socket_afinet: Remove a conditional skipThe test runs without any unexpected results when mac_portacl is loaded.PR:		238781MFC after:	1 week

            List of files:
            /freebsd/tests/sys/netinet/socket_afinet.c</description>
        <pubDate>Fri, 17 Apr 2026 14:48:39 +0200</pubDate>
        <dc:creator>Mark Johnston &lt;markj@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>9df110b11f2dc8802fe6418b96e417f93ba6a753 - tests/netinet: fix tests that depended on connect(in6addr_any)</title>
        <link>http://kernelsources.org:8080/source/history/freebsd/tests/sys/netinet/socket_afinet.c#9df110b11f2dc8802fe6418b96e417f93ba6a753</link>
        <description>tests/netinet: fix tests that depended on connect(in6addr_any)Fixes:	627e126dbb07b167b028380ef61bb45f10493938

            List of files:
            /freebsd/tests/sys/netinet/socket_afinet.c</description>
        <pubDate>Fri, 30 Jan 2026 22:31:13 +0100</pubDate>
        <dc:creator>Gleb Smirnoff &lt;glebius@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>50789d0b600bd2c1f9ea50b401473e3fd8b60851 - tests/netinet: fix several tests that depended on connect(INADDR_ANY)</title>
        <link>http://kernelsources.org:8080/source/history/freebsd/tests/sys/netinet/socket_afinet.c#50789d0b600bd2c1f9ea50b401473e3fd8b60851</link>
        <description>tests/netinet: fix several tests that depended on connect(INADDR_ANY)Fixes:	cd240957d7ba43d819e9d59c6f6517fe915102c7

            List of files:
            /freebsd/tests/sys/netinet/socket_afinet.c</description>
        <pubDate>Wed, 28 May 2025 02:24:59 +0200</pubDate>
        <dc:creator>Gleb Smirnoff &lt;glebius@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>c9756953bded0d8428027fa3e812c9bdac069252 - inpcb: Further restrict binding to a port owned by a different UID</title>
        <link>http://kernelsources.org:8080/source/history/freebsd/tests/sys/netinet/socket_afinet.c#c9756953bded0d8428027fa3e812c9bdac069252</link>
        <description>inpcb: Further restrict binding to a port owned by a different UIDSee commit 4f02a7d739b3 for more background.I cannot see a good reason to continue ignoring mismatching UIDs whenbinding to INADDR_ANY.  Looking at the sdr.V2.4a7n sources (mentioned inbugzilla PR 7713), there is a CANT_MCAST_BIND hack wherein theapplication binds to INADDR_ANY instead of a multicast address, butCANT_MCAST_BIND isn&apos;t defined for FreeBSD builds.It seems unlikely that we still have a use-case for allowing socketsfrom different UIDs to bind to the same port when binding to theunspecified address.  And, as noted in D47832, applications like sdrwould have been broken by the inverted SO_REUSEPORT check removed inthat revision, apparently without any bug reports.  Let&apos;s breakcompatibility and simply disallow this case outright.Also, add some comments, remove a hack in a regression test which teststhis funtionality, and add a new regression test to exercise theremaining checks that were added in commit 4658dc8325e03.MFC after:	1 monthSponsored by:	Klara, Inc.Sponsored by:	StormshieldDifferential Revision:	https://reviews.freebsd.org/D47870

            List of files:
            /freebsd/tests/sys/netinet/socket_afinet.c</description>
        <pubDate>Mon, 23 Dec 2024 16:31:11 +0100</pubDate>
        <dc:creator>Mark Johnston &lt;markj@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>4f02a7d739b354eef38e19b25866f64842d69414 - inpcb: Remove bogus SO_REUSEPORT(_LB) checks in in_pcbbind()</title>
        <link>http://kernelsources.org:8080/source/history/freebsd/tests/sys/netinet/socket_afinet.c#4f02a7d739b354eef38e19b25866f64842d69414</link>
        <description>inpcb: Remove bogus SO_REUSEPORT(_LB) checks in in_pcbbind()This check for SO_REUSEPORT was added way back in commit 52b65dbe85faf.Per the commit log, this commit restricted this port-stealing check tounicast addresses, and then only if the existing socket does not haveSO_REUSEPORT set.  In other words, if there exists a socket bound toINADDR_ANY, and we bind a socket to INADDR_ANY with the same port, thenthe two sockets need not be owned by the same user if the existingsocket has SO_REUSEPORT set.This is a surprising semantic; bugzilla PR 7713 gives some additionalcontext.  That PR makes a case for the behaviour described above whenbinding to a multicast address.  But, the SO_REUSEPORT check is onlyapplied when binding to a non-multicast address, so it doesn&apos;t reallymake sense.  In the PR the committer notes that &quot;unicast applicationsdon&apos;t set SO_REUSEPORT&quot;, which makes some sense, but also refers to&quot;multicast applications that bind to INADDR_ANY&quot;, which sounds a bitsuspicious.OpenBSD performs the multicast check, but not the SO_REUSEPORT check.DragonflyBSD removed the SO_REUSEPORT (and INADDR_ANY) checks back in2014 (commit 0323d5fde12a4).  NetBSD explicitly copied our logic andstill has it.The plot thickens: 20 years later, SO_REUSEPORT_LB was ported fromDragonflyBSD: this option provides similar semantics to SO_REUSEPORT,but for unicast addresses it causes incoming connections/datagrams to bedistributed among all sockets in the group.  This commit (1a43cff92a20d)inverted the check for SO_REUSEPORT while adding one forSO_REUSEPORT_LB; this appears to have been inadvertent.  However:- apparently no one has noticed that the semantics were changed;- sockets belonging to different users can now be bound to the same port  so long as they belong to a single lbgroup bound to INADDR_ANY, which  is not correct.Simply remove the SO_REUSEPORT(_LB) checks, as their originaljustification was dubious and their current implementation is wrong; addsome tests.Reviewed by:	glebiusMFC after:	1 monthSponsored by:	Klara, Inc.Sponsored by:	StormshieldDifferential Revision:	https://reviews.freebsd.org/D47832

            List of files:
            /freebsd/tests/sys/netinet/socket_afinet.c</description>
        <pubDate>Thu, 12 Dec 2024 15:06:06 +0100</pubDate>
        <dc:creator>Mark Johnston &lt;markj@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>1d386b48a555f61cb7325543adbbb5c3f3407a66 - Remove $FreeBSD$: one-line .c pattern</title>
        <link>http://kernelsources.org:8080/source/history/freebsd/tests/sys/netinet/socket_afinet.c#1d386b48a555f61cb7325543adbbb5c3f3407a66</link>
        <description>Remove $FreeBSD$: one-line .c patternRemove /^[\s*]*__FBSDID\(&quot;\$FreeBSD\$&quot;\);?\s*\n/

            List of files:
            /freebsd/tests/sys/netinet/socket_afinet.c</description>
        <pubDate>Wed, 16 Aug 2023 19:54:42 +0200</pubDate>
        <dc:creator>Warner Losh &lt;imp@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>150d8ca9f3baa0c0b049ce2e6ba4a88dc5d8e341 - socket afinet tests: using dynamic ports instead of the same static port</title>
        <link>http://kernelsources.org:8080/source/history/freebsd/tests/sys/netinet/socket_afinet.c#150d8ca9f3baa0c0b049ce2e6ba4a88dc5d8e341</link>
        <description>socket afinet tests: using dynamic ports instead of the same static portAllows these tests to be run in parallel.Approved by:	markjSponsored by:	NetflixDifferential Revision:	https://reviews.freebsd.org/D40859

            List of files:
            /freebsd/tests/sys/netinet/socket_afinet.c</description>
        <pubDate>Tue, 04 Jul 2023 21:11:24 +0200</pubDate>
        <dc:creator>Olivier Cochard &lt;olivier@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>b1c66bc44af099174afb9840c7db011a5bd0225d - netinet tests: Add a test which connects a disconnected socket</title>
        <link>http://kernelsources.org:8080/source/history/freebsd/tests/sys/netinet/socket_afinet.c#b1c66bc44af099174afb9840c7db011a5bd0225d</link>
        <description>netinet tests: Add a test which connects a disconnected socketMFC after:	2 weeksSponsored by:	The FreeBSD Foundation

            List of files:
            /freebsd/tests/sys/netinet/socket_afinet.c</description>
        <pubDate>Fri, 23 Jun 2023 16:06:13 +0200</pubDate>
        <dc:creator>Mark Johnston &lt;markj@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>4d846d260e2b9a3d4d0a701462568268cbfe7a5b - spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD</title>
        <link>http://kernelsources.org:8080/source/history/freebsd/tests/sys/netinet/socket_afinet.c#4d846d260e2b9a3d4d0a701462568268cbfe7a5b</link>
        <description>spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDThe SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catchup to that fact and revert to their recommended match of BSD-2-Clause.Discussed with:		pfgMFC After:		3 daysSponsored by:		Netflix

            List of files:
            /freebsd/tests/sys/netinet/socket_afinet.c</description>
        <pubDate>Wed, 10 May 2023 17:40:58 +0200</pubDate>
        <dc:creator>Warner Losh &lt;imp@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>3aaaa2efde896e19d229ee2cf09fe7e6ab0fbf6e - poll(2): Add POLLRDHUP.</title>
        <link>http://kernelsources.org:8080/source/history/freebsd/tests/sys/netinet/socket_afinet.c#3aaaa2efde896e19d229ee2cf09fe7e6ab0fbf6e</link>
        <description>poll(2): Add POLLRDHUP.Teach poll(2) to support Linux-style POLLRDHUP events for sockets, ifrequested.  Triggered when the remote peer shuts down writing or closesits end.Reviewed by:	kibMFC after:	1 monthDifferential Revision:	https://reviews.freebsd.org/D29757

            List of files:
            /freebsd/tests/sys/netinet/socket_afinet.c</description>
        <pubDate>Wed, 28 Apr 2021 11:31:38 +0200</pubDate>
        <dc:creator>Thomas Munro &lt;tmunro@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>69b7dbeb38635aa10c98dfd41047ac2e204b1413 - Only skip sys.netinet.socket_afinet.socket_afinet_bind_zero in CI env</title>
        <link>http://kernelsources.org:8080/source/history/freebsd/tests/sys/netinet/socket_afinet.c#69b7dbeb38635aa10c98dfd41047ac2e204b1413</link>
        <description>Only skip sys.netinet.socket_afinet.socket_afinet_bind_zero in CI envSponsored by:	The FreeBSD Foundation

            List of files:
            /freebsd/tests/sys/netinet/socket_afinet.c</description>
        <pubDate>Mon, 20 Apr 2020 16:24:13 +0200</pubDate>
        <dc:creator>Li-Wen Hsu &lt;lwhsu@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>7f49ce7a0b5f0d501d233308d73ccb1bf191a68b - MFHead @349476</title>
        <link>http://kernelsources.org:8080/source/history/freebsd/tests/sys/netinet/socket_afinet.c#7f49ce7a0b5f0d501d233308d73ccb1bf191a68b</link>
        <description>MFHead @349476Sponsored by:	The FreeBSD Foundation

            List of files:
            /freebsd/tests/sys/netinet/socket_afinet.c</description>
        <pubDate>Fri, 28 Jun 2019 01:50:54 +0200</pubDate>
        <dc:creator>Alan Somers &lt;asomers@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>01e92e29779c6373d3353d81c3a139f4671669e2 - Skip sys.netinet.socket_afinet.socket_afinet_bind_zero temporarily because it</title>
        <link>http://kernelsources.org:8080/source/history/freebsd/tests/sys/netinet/socket_afinet.c#01e92e29779c6373d3353d81c3a139f4671669e2</link>
        <description>Skip sys.netinet.socket_afinet.socket_afinet_bind_zero temporarily because itdoesn&apos;t work when mac_portacl(4) loadedPR:		238781Sponsored by:	The FreeBSD Foundation

            List of files:
            /freebsd/tests/sys/netinet/socket_afinet.c</description>
        <pubDate>Sun, 23 Jun 2019 21:37:12 +0200</pubDate>
        <dc:creator>Li-Wen Hsu &lt;lwhsu@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>0269ae4c19ad779b43b0d6e2416ac7386945d692 - MFHead @348740</title>
        <link>http://kernelsources.org:8080/source/history/freebsd/tests/sys/netinet/socket_afinet.c#0269ae4c19ad779b43b0d6e2416ac7386945d692</link>
        <description>MFHead @348740Sponsored by:	The FreeBSD Foundation

            List of files:
            /freebsd/tests/sys/netinet/socket_afinet.c</description>
        <pubDate>Thu, 06 Jun 2019 18:20:50 +0200</pubDate>
        <dc:creator>Alan Somers &lt;asomers@FreeBSD.org&gt;</dc:creator>
    </item>
<item>
        <title>aa32159686aea482c6e5fffdac952904a1cfc13c - Add very basic afinet socket tests which I started to write in order</title>
        <link>http://kernelsources.org:8080/source/history/freebsd/tests/sys/netinet/socket_afinet.c#aa32159686aea482c6e5fffdac952904a1cfc13c</link>
        <description>Add very basic afinet socket tests which I started to write in orderto then try to reproduce a kernel panic, which turned out to be arace condition and hard to test from here.Commit the changes anywhere as the &quot;bind zero&quot; case was a surpriseto me and we should try to maintain this status.Also it is easy examples someone can build upon.With help from:	markjEvent:		Waterloo Hackathon 2019

            List of files:
            /freebsd/tests/sys/netinet/socket_afinet.c</description>
        <pubDate>Tue, 21 May 2019 21:42:04 +0200</pubDate>
        <dc:creator>Bjoern A. Zeeb &lt;bz@FreeBSD.org&gt;</dc:creator>
    </item>
</channel>
</rss>
