Commit graph

10052 commits

Author SHA1 Message Date
Kristof Provost 9b2326333e pfctl: use libpfctl instead of DIOCGETRULES directly
MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 47a0b59379)
2023-12-04 16:21:05 +01:00
Gordon Bergling 234ee2a34b SEE ALSO section improvements for tuning(7), tunefs(8) and fsck_ffs(8)
cross-reference ffs(7) in fsck_ffs(8)
cross-reference ffs(7) and tuning(7) in tunefs(8)
cross-reference ffs(7) in tuning(7)

PR:	263433
Reviewed by:	bcr
Differential Revision:	https://reviews.freebsd.org/D42631

(cherry picked from commit 115459be31)
2023-11-22 09:26:43 +01:00
Konstantin Belousov 26c99c95cc reboot(8): print syscall error on sysctl failure
(cherry picked from commit a294b02fbc)
2023-11-20 03:40:34 +02:00
Konstantin Belousov e6278ae2bd reboot(8): adapt for vmmeter v_swappgsin expansion to 64bit
PR:	275048

(cherry picked from commit 194cc45a81)
2023-11-20 03:40:34 +02:00
Jose Luis Duran 29667c6fcc ping: Avoid reporting NaNs
Avoid calculating the square root of negative zero, which can easily
happen on certain architectures when calculating the population standard
deviation with a sample size of one, e.g., 0.01 - (0.1 * 0.1) =
-0.000000.

Avoid returning a NaN by capping the minimum possible variance value to
zero (positive).

In the future, maybe skip reporting statistics at all for a single
sample.

Reported by:	Jenkins
Reviewed by:	asomers
MFC after:	1 week
Pull Request:	https://github.com/freebsd/freebsd-src/pull/863
Differential Revision:	https://reviews.freebsd.org/D42114

(cherry picked from commit 4d348e83b7)
2023-11-13 10:20:50 -05:00
Kristof Provost 221a60a426 pf: expose more syncookie state information to userspace
Allow userspace to retrieve low and high water marks, as well as the
current number of half open states.

MFC after:	1 week
Sponsored by:	Modirum MDPay

(cherry picked from commit a6173e9463)
2023-11-13 08:10:47 +01:00
Kirk McKusick d3d779f647 Delete snapshot after opening it when running fsck_ffs(9) in background.
PR:           106107

(cherry picked from commit d3a36e4b74)
2023-11-11 22:51:14 -08:00
Antranig Vartanian cddce522f1
ping6(8): Add ping6(8) as MLINK to ping(8)
Reviewed by:	chuck
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D42203

(cherry picked from commit d6e457328d)
2023-11-10 15:42:07 +08:00
Kristof Provost 79b69575d8 pf: support SCTP-specific timeouts
Allow SCTP state timeouts to be configured independently from TCP state
timeouts.

Reviewed by:	tuexen
MFC after:	1 week
Sponsored by:	Orange Business Services
Differential Revision:	https://reviews.freebsd.org/D42393

(cherry picked from commit ca9dbde881)
2023-11-07 16:25:02 +01:00
Konstantin Belousov 342bf5645f setkey(8): make the policy specification more readable
(cherry picked from commit 224fc33f60)
2023-11-07 12:43:37 +02:00
Kirk McKusick b08c5c8acf Fix a bug in fsck_ffs(8) triggered by corrupted filesystems.
Reported-by:  Andreas Bock
PR:           274404
(cherry picked from commit 1e39a0886e)
2023-10-28 14:14:32 -07:00
Kristof Provost dfaadbb466 pfctl: fix incorrect mask on dynamic address
A PF rule using an IPv4 address followed by an IPv6 address and then a
dynamic address, e.g. "pass from {192.0.2.1 2001:db8::1} to (pppoe0)",
will have an incorrect /32 mask applied to the dynamic address.

MFC after:	3 weeks
Obtained from:	OpenBSD
See also:	https://ftp.openbsd.org/pub/OpenBSD/patches/5.6/common/007_pfctl.patch.sig
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Event:		Oslo Hackathon at Modirum

(cherry picked from commit 7ce98cf2f8)
2023-10-27 09:46:19 +02:00
John Baldwin de270f81b2 Purge more stray embedded $FreeBSD$ strings
These do not use __FBSDID but instead use bare char arrays.

Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D41957

(cherry picked from commit eba230afba)
2023-10-24 11:13:18 -07:00
John Baldwin 4ebc032713 ifconfig/ifvlan.c: Whitespace fix
(cherry picked from commit 701468baa4)
2023-10-24 11:13:18 -07:00
Mateusz Piotrowski b10a23df1c ifconfig.8: Improve readability of vlanproto's description
Sponsored by:	Klara Inc.
MFC after:	1 week

(cherry picked from commit 197947e0a3)
2023-10-04 13:11:05 +02:00
Zhenlei Huang e31a331ddd ipfw.8: Adjust section for loader tunables
Move the descriptions of loader tunables from section 'SYSCTL VARIABLES'
to section 'LOADER TUNABLES'.

See also 49197c391b (ipfw: Add sysctl flag CTLFLAG_TUN to loader tunables).

MFC after:	2 days
Differential Revision:	https://reviews.freebsd.org/D41981

(cherry picked from commit 12349f3889)
(cherry picked from commit bb6f9a9540)
2023-10-02 16:28:23 +08:00
Dag-Erling Smørgrav 12e9c68924 ping: The -C option is also supported for IPv6.
MFC after:	3 days
Sponsored by:	Klara, Inc.
Sponsored by:	NetApp, Inc.
Reviewed by:	rscheff, allanjude
Differential Revision:	https://reviews.freebsd.org/D41881

(cherry picked from commit a2d1360142)
2023-09-29 00:34:54 +00:00
Dag-Erling Smørgrav f01e4edfc8 libipf: fix parser error message.
MFC after:	1 week
Reviewed by:	cy
Differential Revision:	https://reviews.freebsd.org/D41652

(cherry picked from commit 4cd9d804ae)
2023-09-14 16:59:52 +02:00
Kristof Provost fa0c6b66dc pf: expose syncookie active/inactive status
When syncookies are in adaptive mode they may be active or inactive.
Expose this status to users.

Suggested by:	Guido van Rooij
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 444a77ca85)
2023-08-28 10:17:17 +02:00
Warner Losh 350f9ac5b3 Remove $FreeBSD$: one-line bare tag
Remove /^\s*\$FreeBSD\$$\n/

Similar commit in main:
(cherry picked from commit 05248206f7)
2023-08-23 11:43:33 -06:00
Warner Losh 24115b70d6 Remove $FreeBSD$: one-line nroff pattern
Remove /^\.\\"\s*\$FreeBSD\$$\n/

Similar commit in main:
(cherry picked from commit b2c76c41be)
2023-08-23 11:43:32 -06:00
Warner Losh b144e70a33 Remove $FreeBSD$: two-line nroff pattern
Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/

Similar commit in main:
(cherry picked from commit fa9896e082)
2023-08-23 11:43:31 -06:00
Warner Losh 023fc80ee3 Remove $FreeBSD$: one-line sh pattern
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/

Similar commit in main:
(cherry picked from commit d0b2dbfa0e)
2023-08-23 11:43:30 -06:00
Warner Losh e63c5c73c1 Remove $FreeBSD$: alt one-line .c pattern
Remove /^\s*__RCSID\("\$FreeBSD\$"\);\n/

Similar commit in main:
(cherry picked from commit c857356409)
2023-08-23 11:43:26 -06:00
Warner Losh 9a298a1247 Remove $FreeBSD$: alt two-line .c pattern
Remove /^\s*__RCSID\("\$FreeBSD\$"\);\n\n/

Similar commit in main:
(cherry picked from commit da5432eda8)
2023-08-23 11:43:26 -06:00
Warner Losh 3d497e17eb Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/

Similar commit in main:
(cherry picked from commit 1d386b48a5)
2023-08-23 11:43:26 -06:00
Warner Losh 8ad303d68c Remove $FreeBSD$: one-line .c comment pattern
Remove /^/[*/]\s*\$FreeBSD\$.*\n/

Similar commit in main:
(cherry picked from commit 2a63c3be15)
2023-08-23 11:43:23 -06:00
Warner Losh 34041aac83 Remove $FreeBSD$: one-line .h pattern
Remove /^\s*\*+\s*\$FreeBSD\$.*$\n/

Similar commit in main:
(cherry picked from commit 42b388439b)
2023-08-23 11:43:22 -06:00
Warner Losh 17da660ad5 Remove $FreeBSD$: two-line .h pattern
Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/

Similar commit in main:
(cherry picked from commit b3e7694832)
2023-08-23 11:43:21 -06:00
Kirk McKusick 6412782800 Support background fsck_ffs(8) on filesystems using journaled soft updates
Tested-by:    Peter Holm
Sponsored-by: The FreeBSD Foundation

(cherry picked from commit 344b5bf825)
2023-08-19 21:27:37 -07:00
Kirk McKusick 2e025e4107 Update newfs(8) and tunefs(8) manual pages.
Sponsored-by: The FreeBSD Foundation
(cherry picked from commit 4ce2a2db41)
2023-08-19 21:27:37 -07:00
R. Christian McDonald 31d385e78e ping: use the in6_addr buffer when parsing src address as AF_INET6
Reviewed by:	kp
MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 9f2cddd261)
2023-08-16 17:04:04 +02:00
Yan Ka, Chiu 07cbc2f943 route(8): teach route to attach to jails
Add -j <jail> flag to route(8) to allow route to perform actions in
a Jail.

Differential Revision: https://reviews.freebsd.org/D40377
MFC after:	2 weeks

(cherry picked from commit ab4d1b73cb)
2023-08-16 13:25:57 +01:00
Yan Ka Chiu 3af7700710 ifconfig(8): Teach ifconfig to attach and run itself in a jail
Add -j <jail> flag to ifconfig to allow ifconfig to attach and run inside a
jail. This allow parent to configure network interfaces of its children
even if ifconfig is not available in child's tree (e.g. Linux Jails)

Reviewed by:	emaste, khng, melifaro
Event:		Kitchener-Waterloo Hackathon 202305
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D40213

(cherry picked from commit 7e49aa86a2)
2023-08-16 13:25:57 +01:00
Kirk McKusick db25f7b140 Improve dumpfs(8) error messages when a cylinder group read fails.
Sponsored-by: The FreeBSD Foundation
(cherry picked from commit 02b7bf07c5)
2023-08-12 12:11:42 -07:00
Kristof Provost 9b60a37c1e pf: initial SCTP support
Basic state tracking for SCTP. This means we scan through the packet to
identify the different chunks (so we can identify state changes).

MFC after:	3 weeks
Sponsored by:	Orange Business Services
Differential Revision:	https://reviews.freebsd.org/D40862

(cherry picked from commit 010ee43f56)
2023-08-11 14:13:09 +02:00
Kristof Provost 9b14d6c173 pfctl: SCTP can have port numbers
MFC after:	3 weeks
Sponsored by:	Orange Business Services
Differential Revision:	https://reviews.freebsd.org/D40861

(cherry picked from commit 0bd4a6837c)
2023-08-11 14:13:09 +02:00
Tom Hukins 4b96066ac0 gpart(8): Improve manual page syntax
Fix various warnings from `mandoc -Tlint lib/geom/part/gpart.8`.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/702

(cherry picked from commit 409594ef34)
2023-08-06 19:43:36 +02:00
Tom Hukins 555a4a30a0 camcontrol(8): Use simpler language
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/702

(cherry picked from commit 2bcbf4d831)
2023-08-06 19:38:40 +02:00
Tom Hukins 3fb913e58d camcontrol(8): Add manual page cross references
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/702

(cherry picked from commit 2675b8bd3d)
2023-08-06 19:38:31 +02:00
Wolfram Schneider a38661a36b update external URL
(cherry picked from commit c918f50f8b)
2023-08-06 19:38:04 +02:00
Kirk McKusick 44e4279e56 Add diagnostics to fsck_ffs(8) for journaled soft-updates debugging.
Sponsored-by: The FreeBSD Foundation
(cherry picked from commit 6f0ca273a3)
2023-08-04 23:22:19 -07:00
Kirk McKusick 98b660abff Add quitclean command to fsdb(8) to request a filesystem not be marked dirty.
Sponsored-by: The FreeBSD Foundation
(cherry picked from commit d059e44b80)
2023-08-04 23:20:25 -07:00
Kirk McKusick bcbb927b97 Have fsdb(8) only mark a filesystem dirty when it is modified.
Sponsored-by: The FreeBSD Foundation
(cherry picked from commit d51bdf327d)
2023-08-04 23:17:30 -07:00
Kirk McKusick f40d616aec Debugging output additions. No functional changes intended.
Sponsored-by: The FreeBSD Foundation
(cherry picked from commit 4d512b0735)
2023-08-04 23:13:25 -07:00
Kirk McKusick 1cd2b2f96f Text format cleanups. No functional changes intended.
Sponsored-by: The FreeBSD Foundation
(cherry picked from commit 239597e030)
2023-08-04 23:11:08 -07:00
Warner Losh 6d30916e9b spdx: The BSD-3-Clause-FreeBSD identifier never was, drop -FreeBSD
There never was a BSD-3-Clause-FreeBSD SPDX identifier. Replace it
with BSD-3-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix

(cherry picked from commit eb8f887758)
2023-07-25 09:18:00 -06:00
Warner Losh f73b4bf27c spdx: The BSD-2-Clause-NetBSD identifier is obsolete, drop -NetBSD
The SPDX folks have obsoleted the BSD-2-Clause-NetBSD 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

(cherry picked from commit b61a573019)
2023-07-25 09:15:32 -06:00
Warner Losh caa41f6417 spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
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

(cherry picked from commit 4d846d260e)
2023-07-25 09:13:49 -06:00
Koichiro Iwao 3847899470 ifconfig.8: Document limitation of groupname
Approved by:		kp
MFC after:		1 week
Differential Revision:	https://reviews.freebsd.org/D40645

(cherry picked from commit 9aca30d878)
2023-07-11 09:20:03 +09:00