FreeBSD/src 98e34e8contrib/ntp/ntpd ntp_proto.c

ntp: Undo upstream (ntp.org) fix for upstream Bug 3851

The patch for upstream (ntp.org) fix for upstream Bug 3851 may have
fixed a Linux bug but it caused a regression when ntpd is run on
FreeBSD.

Suggested that so@ publish an errata and merge this to releng/14.2.

PR:             283116
MFH:            3 days
DeltaFile
+2-0contrib/ntp/ntpd/ntp_proto.c
+2-01 files

FreeBSD/src 3a56015lib/csu Makefile.inc, lib/csu/tests Makefile

pkgbase: fix inclusion of tests in ssh, bsnmp, clibs-dev

Currently, files that belong in the tests package are included in the
ssh, bsnmp, and clibs-dev packages:

ssh.plist
24:@dir(root,wheel,0755,) /usr/tests/secure/libexec
25:@(root,wheel,0444,) /usr/tests/secure/libexec/Kyuafile

bsnmp.plist
82:@dir(root,wheel,0755,) /usr/tests/lib/libbsnmp
83:@(root,wheel,0444,) /usr/tests/lib/libbsnmp/Kyuafile
84:@(root,wheel,0555,) /usr/tests/lib/libbsnmp/bsnmpd_test

clibs-dev.plist
2518:@dir(root,wheel,0755,) /usr/tests/lib/csu
2519:@(root,wheel,0444,) /usr/tests/lib/csu/Kyuafile

This is caused by the PACKAGE=foo assignment in foo/Makefile.inc which

    [9 lines not shown]
DeltaFile
+1-1lib/csu/Makefile.inc
+2-0lib/csu/tests/Makefile
+1-1lib/libbsnmp/Makefile.inc
+2-0lib/libbsnmp/tests/Makefile
+1-1secure/libexec/Makefile.inc
+1-0secure/libexec/tests/Makefile
+8-36 files

FreeBSD/src 4c6d5d4share/man/man4 igc.4, sys/dev/igc if_igc.c

igc.4: Add I226 and other additions to supported list

(cherry picked from commit 850f78d5a191d0058fcd20beb8b1309b795ecdbd)
DeltaFile
+18-2share/man/man4/igc.4
+1-1sys/dev/igc/if_igc.c
+19-32 files

FreeBSD/src 6cfff79share/man/man4 igc.4, sys/dev/igc if_igc.c

igc.4: Add I226 and other additions to supported list

(cherry picked from commit 850f78d5a191d0058fcd20beb8b1309b795ecdbd)
DeltaFile
+18-2share/man/man4/igc.4
+1-1sys/dev/igc/if_igc.c
+19-32 files

FreeBSD/src 673cd5fsys/dev/sfxge sfxge.c

sfxge: defer ether_ifattach to when ifmedia_init is done

Otherwise the ifmedia subsystem may call unguarded NULL function
pointers.  Same issue that was fixed for cxgb(4) in f2daf8995.

Also see:       https://github.com/opnsense/src/issues/228

(cherry picked from commit 0482974b2c021a8abbc044d3e2b1240250f791e7)
DeltaFile
+3-7sys/dev/sfxge/sfxge.c
+3-71 files

FreeBSD/src 969d1aasys/fs/fuse fuse_vfsops.c, tests/sys/fs/fusefs nfs.cc

fusefs: fix a memory leak

Fix a leak of a fuse_ticket structure.  The leak mostly affected
NFS-exported fuse file systems, and was triggered by a failure during
FUSE_LOOKUP.

MFC after:      2 weeks
Sponsored by:   ConnectWise
DeltaFile
+30-0tests/sys/fs/fusefs/nfs.cc
+1-1sys/fs/fuse/fuse_vfsops.c
+31-12 files

FreeBSD/src 003818ausr.bin/sed/tests sed2_test.sh

sed tests: Add a regression test for the c function

Based on the test case from PR 271817 by Mohamed Akram.

PR:             271817
MFC after:      2 weeks
DeltaFile
+23-0usr.bin/sed/tests/sed2_test.sh
+23-01 files

FreeBSD/src 5982237usr.bin/sed process.c, usr.bin/sed/tests sed2_test.sh

sed: Fix handling of an empty pattern space

Add a regression test.

PR:             271791
Obtained from:  OpenBSD (1.38 millert)
MFC after:      2 weeks
DeltaFile
+14-0usr.bin/sed/tests/sed2_test.sh
+4-6usr.bin/sed/process.c
+18-62 files

FreeBSD/src 053a988lib/libsys close.2, sys/netinet tcp_usrreq.c

tcp: don't ever return ECONNRESET on close(2)

The SUS doesn't mention this error code as a possible one [1]. The FreeBSD
manual page specifies a possible ECONNRESET for close(2):

[ECONNRESET]    The underlying object was a stream socket that was
                shut down by the peer before all pending data was
                delivered.

In the past it had been EINVAL (see 21367f630d72), and this EINVAL was
added as a safety measure in 623dce13c64ef.  After conversion to
ECONNRESET it had been documented in the manual page in 78e3a7fdd51e6, but
I bet wasn't ever tested to actually be ever returned, cause the
tcp-testsuite[2] didn't exist back then.  So documentation is incorrect
since 2006, if my bet wins.  Anyway, in the modern FreeBSD the condition
described above doesn't end up with ECONNRESET error code from close(2).
The error condition is reported via SO_ERROR socket option, though.  This
can be checked using the tcp-testsuite, temporarily disabling the
getsockopt(SO_ERROR) lines using sed command [3].  Most of these

    [33 lines not shown]
DeltaFile
+1-4lib/libsys/close.2
+0-5sys/netinet/tcp_usrreq.c
+1-92 files

FreeBSD/src 893839busr.bin/diff diffreg_new.c

diff: Fix device case.

We already fell back to Stone for FIFOs, but we actually need to fall
back to Stone for everything except regular files, because libdiff's
atomizer needs to know the size of its input in advance, and neither
FIFOs nor devices can be trusted to report their size.

MFC after:      1 week
Reported by:    mav
Reviewed by:    mav, allanjude
Differential Revision:  https://reviews.freebsd.org/D48181
DeltaFile
+2-2usr.bin/diff/diffreg_new.c
+2-21 files

FreeBSD/src 5c15d49sys/dev/ixl ixl_pf_main.c

Revert "ixl: fix multicast filters handling"

This reverts commit 89e73359424a338a7900a4854ad7439f5848ebb8.

PR:             281125
Reviewed by:    Krzysztof Galazka <krzysztof.galazka at intel.com>
MFC after:      3 days
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1545

(cherry picked from commit 38663adb61440bd659fb457909782b71ba8806fa)
DeltaFile
+10-87sys/dev/ixl/ixl_pf_main.c
+10-871 files

FreeBSD/src 2a6c77bsys/compat/linuxkpi/common/src linux_80211.c

linuxkpi: Fix a lock leak in lkpi_sta_scan_to_auth()

PR:             283015
Reviewed by:    bz
MFC after:      1 week
Fixes:          0936c648ad0e ("LinuxKPI: 802.11: update the ni/lsta reference cycle")
Differential Revision:  https://reviews.freebsd.org/D47949

(cherry picked from commit 926905796749750da6464b97ec4f8eec0882cc0e)
DeltaFile
+2-0sys/compat/linuxkpi/common/src/linux_80211.c
+2-01 files

FreeBSD/src ae21b1fshare/dtrace ipfw.d

ipfw.d: Add required dependency declarations

ipfw.d requires definitions of, at least, in_addr_t and struct ip6_addr,
which it must obtain from CTF info.  This is found by looking at
$(sysctl -n kern.bootfile)/kernel, which might not be available in a
jail.

These depends_on declarations ensure that dtrace(1) invocations will
simply abort processing of ipfw.d if the required binaries can't be
found, rather than raising an error.

PR:             283359
MFC after:      1 week

(cherry picked from commit b64c5a0ace59af62eff52bfe110a521dc73c937b)
DeltaFile
+2-0share/dtrace/ipfw.d
+2-01 files

FreeBSD/src b45f84cusr.sbin/makefs cd9660.c

makefs: Exit with error if writing cd image fails

Obtained from:  OpenBSD c8f48d9b1ea9
Sponsored by:   The FreeBSD Foundation
DeltaFile
+6-3usr.sbin/makefs/cd9660.c
+6-31 files

FreeBSD/src 37d6a85share/misc bsd-family-tree

bsd-family-tree: add NetBSD 10.1

(cherry picked from commit c4ca1d214f9a3d20e9381233314a57526ac9b515)
DeltaFile
+15-12share/misc/bsd-family-tree
+15-121 files

FreeBSD/src 0a5dea7share/misc bsd-family-tree

bsd-family-tree: add FreeBSD 14.2

(cherry picked from commit ac3dedf4e8e08647a2c08e75f1ef69d8bb2831e6)
DeltaFile
+7-4share/misc/bsd-family-tree
+7-41 files

FreeBSD/src a4f31efshare/misc bsd-family-tree

bsd-family-tree: add macOS 15

While I'm here fix whitespaces for recent OpenBSD releases.

(cherry picked from commit bdbf50660c51534d7a25569349bcdf2d4e460f50)
DeltaFile
+5-2share/misc/bsd-family-tree
+5-21 files

FreeBSD/src 9e3d32bshare/misc bsd-family-tree

bsd-family-tree: FreeBSD 13.4 and OpenBSD 7.6 added

(cherry picked from commit 3ebb738a93139fd2f8826a62b5f282480f2e19d5)
DeltaFile
+13-8share/misc/bsd-family-tree
+13-81 files

FreeBSD/src 8377ba3share/misc bsd-family-tree

bsd-family-tree: NetBSD 8.3 added

PR:     280983
(cherry picked from commit d399c791b223953d230423eff1d56fb45a1be77c)
DeltaFile
+51-48share/misc/bsd-family-tree
+51-481 files

FreeBSD/src 8cc248fusr.sbin/syslogd syslogd.c syslogd.8, usr.sbin/syslogd/tests syslogd_relayed_format_test.sh syslogd_forwarded_format_test.sh

syslogd: Add rfc3164-strict format option

The syslogd bsd/rfc3164 message format does not strictly conform to the
format recommended in RFC 3164 when syslog messages are forwarded from
remote hosts.

The new rfc3164-strict format generates messages that conform with the
RFC 3164 recommended format. The existing format is maintained for
backwards compatibility.

PR:             220246
Reviewed by:    markj
MFC after:      3 weeks
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1536
DeltaFile
+25-9usr.sbin/syslogd/syslogd.c
+27-0usr.sbin/syslogd/tests/syslogd_relayed_format_test.sh
+26-0usr.sbin/syslogd/tests/syslogd_forwarded_format_test.sh
+20-0usr.sbin/syslogd/tests/syslogd_basic_format_test.sh
+9-2usr.sbin/syslogd/syslogd.8
+107-115 files

FreeBSD/src 65c6184usr.sbin/syslogd/tests syslogd_relayed_format_test.sh Makefile

syslogd: Add syslog relayed message format tests

Reviewed by:    markj
MFC after:      3 weeks
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1536
DeltaFile
+162-0usr.sbin/syslogd/tests/syslogd_relayed_format_test.sh
+1-0usr.sbin/syslogd/tests/Makefile
+163-02 files

FreeBSD/src cd4f813share/misc bsd-family-tree

bsd-family-tree: fix macOS 11 release date

(cherry picked from commit b49aec04f073de02b03b44503feffeb52cbbdd51)
DeltaFile
+1-1share/misc/bsd-family-tree
+1-11 files

FreeBSD/src ee75c99usr.sbin/syslogd/tests syslogd_forwarded_format_test.sh syslogd_format_test_common.sh

syslogd: Add syslog forwarded message format tests

Reviewed by:    markj
MFC after:      3 weeks
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1536
DeltaFile
+213-0usr.sbin/syslogd/tests/syslogd_forwarded_format_test.sh
+56-0usr.sbin/syslogd/tests/syslogd_format_test_common.sh
+1-0usr.sbin/syslogd/tests/Makefile
+0-1usr.sbin/syslogd/tests/syslogd_basic_format_test.sh
+270-14 files

FreeBSD/src f971735share/misc bsd-family-tree

bsd-family-tree: shorter URLs

(cherry picked from commit d4a4d1e742852b00427f723f59534b42718628de)
DeltaFile
+2-2share/misc/bsd-family-tree
+2-21 files

FreeBSD/src 66a022ausr.sbin/syslogd/tests syslogd_test_common.sh syslogd_basic_format_test.sh

syslogd: Add syslog basic message format tests

RFC 3164 and RFC 5424 syslog message format tests and minor refactor of
existing tests to reuse components in new tests.

Reviewed by:    markj
MFC after:      3 weeks
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1536
DeltaFile
+117-0usr.sbin/syslogd/tests/syslogd_test_common.sh
+111-0usr.sbin/syslogd/tests/syslogd_basic_format_test.sh
+1-104usr.sbin/syslogd/tests/syslogd_test.sh
+32-0usr.sbin/syslogd/tests/syslogd_format_test_common.sh
+9-2usr.sbin/syslogd/tests/Makefile
+270-1065 files

FreeBSD/src 5352a50share/misc bsd-family-tree

bsd-family-tree: add NetBSD 9.4

(cherry picked from commit d1e78fbd4a67245e058e9d26b333216093f8d2d1)
DeltaFile
+19-18share/misc/bsd-family-tree
+19-181 files

FreeBSD/src aa94868usr.sbin/syslogd/tests Makefile

syslogd: Remove is_exclusive metadata from tests

- Tests have been updated to use "jail" execution environment,
  is_exclusive="true" is no longer required.
- tests/Makefile update to style.Makefile(5).

Reviewed by:    markj
MFC after:      3 weeks
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1536
DeltaFile
+4-6usr.sbin/syslogd/tests/Makefile
+4-61 files

FreeBSD/src 7a2fc78share/misc bsd-family-tree

bsd-family-tree: add FreeBSD Documentation Archive

(cherry picked from commit 4132c4be4c0a4b80a4ef6f4b8ff0d8ac9a3b9939)
DeltaFile
+3-0share/misc/bsd-family-tree
+3-01 files

FreeBSD/src 57507a2share/misc bsd-family-tree

bsd-family-tree: shorter URL for FreeBSD manual pages

(cherry picked from commit 2a916499470ae35178ca218e68175478037c3b0a)
DeltaFile
+1-1share/misc/bsd-family-tree
+1-11 files

FreeBSD/src c975695sys/netinet in_pcb.c, sys/netinet6 in6_pcb.c

inpcb: Further restrict binding to a port owned by a different UID

See commit 4f02a7d739b3 for more background.

I cannot see a good reason to continue ignoring mismatching UIDs when
binding to INADDR_ANY.  Looking at the sdr.V2.4a7n sources (mentioned in
bugzilla PR 7713), there is a CANT_MCAST_BIND hack wherein the
application binds to INADDR_ANY instead of a multicast address, but
CANT_MCAST_BIND isn't defined for FreeBSD builds.

It seems unlikely that we still have a use-case for allowing sockets
from different UIDs to bind to the same port when binding to the
unspecified address.  And, as noted in D47832, applications like sdr
would have been broken by the inverted SO_REUSEPORT check removed in
that revision, apparently without any bug reports.  Let's break
compatibility and simply disallow this case outright.

Also, add some comments, remove a hack in a regression test which tests
this funtionality, and add a new regression test to exercise the

    [6 lines not shown]
DeltaFile
+76-10tests/sys/netinet/socket_afinet.c
+9-2sys/netinet/in_pcb.c
+9-2sys/netinet6/in6_pcb.c
+94-143 files