Commit graph

9850 commits

Author SHA1 Message Date
Eugene Grosbein e5861a2614 ifconfig.8: cleanup reminiscence about long gone ppp(4)
Replace ppp(4) removed since FreeBSD 8.0-RELEASE with vlan(4).
While here, remove commented out reference to non-existing "egress"
interface group hiding since initial import of interface groups
from OpenBSD in 2006.

(cherry picked from commit 3c9ad9398f)
2022-07-29 09:24:56 +07:00
Eric van Gyzen 1fd2752f6b newfs_msdos: fix type of kern.maxphys
The type of the kern.maxphys sysctl OID is now ulong.  Change the
local variable type to match.

Reviewed by:	delphij, emaste
Sponsored by:	Dell EMC Isilon

(cherry picked from commit 9990450e17)
2022-07-27 09:50:52 -04:00
Zhenlei Huang 52832592bd ifconfig.8: Prefer consistent terminologies
Reviewed by:	pauamma_gundo.com, email_luiz.eng.br
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D35384

(cherry picked from commit ccc48995c2)
2022-07-22 01:56:25 +02:00
Gordon Bergling a101b1b7f2 pfctl(8): Fix a typo in a source code comment
- s/bufer/buffer/

(cherry picked from commit c9856c4ffb)
2022-07-19 18:01:08 +02:00
Andrew Turner a290c3d703 Remove PAGE_SIZE from hastd
It may not be known at compile time so we should detect it at run time.

Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D35118

(cherry picked from commit ea578b34cb)
2022-07-19 08:03:30 +01:00
Rick Macklem 9fe17b520a mount_nfs.8: Update BUGS section for NFSv4.1/4.2
If the "intr" and/or "soft" mount options are used for
NFSv4 mounts, the protocol can be broken when the
operation returns without waiting for the RPC reply.
The likelyhood of failure increases for NFSv4.1/4.2
mounts, since the session slot will be broken when
an RPC reply is not processed.

This is mentioned in the BUGS section of "man mount_nfs",
but there was no specific mention of the session slot
problem.  This patch adds a sentence for this case.

PR: 260011

(cherry picked from commit aba7a81ab7)
2022-07-17 17:04:33 -07:00
Rick Macklem 02915e5ff9 mount_nfs: Warn that intr, soft are not safe for NFSv4
If the "intr" and/or "soft" mount options are used for
NFSv4 mounts, the protocol can be broken when the
operation returns without waiting for the RPC reply.
The likelyhood of failure increases for NFSv4.1/4.2
mounts, since the session slot will be broken when
an RPC reply is not processed.

This is mentioned in the BUGS section of "man mount_nfs",
but more needs to be done.  This patch adds code that
generates a warning message when the mount is done.

PR: 260011
(cherry picked from commit c0d14b0220)
2022-07-14 18:45:43 -07:00
Cy Schubert 831c6b8edd ipfilter: Support only jails in VNET
Jails without VNET have complete access to the ipfilter rules, NAT,
pools and logs. This is insecure. Only allow jails to manipulate
ipfilter rules, NAT tables and ippools if the jail has its own VNET.
Otherwise a jail can affect the global system.

This patch brings ipfilter in line with ipfw's support of VNET jails and
non-support of non-VNET jails.

(cherry picked from commit c47db49ba4)
2022-07-14 06:54:22 -07:00
Arseny Smalyuk c31f8b7bd8 ipfw: add support radix tables and table lookup for MAC addresses
By analogy with IP address matching, add a way to use ipfw radix
tables for MAC matching. This is implemented using new ipfw table
with mac:radix type. Also there are src-mac and dst-mac lookup
commands added.

Usage example:
  ipfw table 1 create type mac
  ipfw table 1 add 11:22:33:44:55:66/48
  ipfw add skipto tablearg src-mac 'table(1)'
  ipfw add deny src-mac 'table(1, 100)'
  ipfw add deny lookup dst-mac 1

Note: sysctl net.link.ether.ipfw=1 should be set to enable ipfw
filtering on L2.

Reviewed by:	melifaro
Obtained from:	Yandex LLC
Relnotes:	yes
Sponsored by:	Yandex LLC
Differential Revision:	https://reviews.freebsd.org/D35103

(cherry picked from commit 81cac3906e)
2022-07-14 16:04:22 +03:00
Kirk McKusick cb59f7dd22 Correctly update fs_dsize in growfs(8)
When growing a UFS/FFS filesystem, the size of the summary information
may expand into additional blocks. These blocks must be removed from
fs_dsize which records the number of blocks in the filesystem that can
be used to hold filesystem data.

While here also update the fs_old_dsize and fs_old_size fields for
compatibility with kernels that were compiled before the addition
of UFS2.

(cherry picked from commit 2049cc3218)
2022-07-08 14:46:16 -07:00
Kirk McKusick e349fcc80a Eliminate set but not used variable.
No functional change intended.

(cherry picked from commit 78dfcf256a)
2022-07-08 14:46:16 -07:00
Mateusz Piotrowski 76b06d5a1a sysctl.8: Reference sysctl(9)
MFC after:	1 week

(cherry picked from commit 0438e9beb5)
2022-07-07 11:56:18 +02:00
Juraj Lutter 7c500f98b8 kldload: Bring functionality in line with manual page
Honor -q parameter and do not display any warning messages when -q is
specified.

Approved by:		dfr
MFC after:		2 weeks
Sponsored by:		Resulta, s.r.o.
Differential Revision:	https://reviews.freebsd.org/D35511

(cherry picked from commit ad0a7ea650)
2022-07-01 17:16:22 +02:00
Mateusz Piotrowski 938f3df8cc ifconfig.8: Document -g all and -G all
The special group name "all" selects all the interfaces.

MFC after:	3 days

(cherry picked from commit 78d4bd8753)
2022-06-29 10:17:59 +02:00
Mateusz Piotrowski c154429082 ifconfig.8: Note that -l accepts -g in addition to -d and -u
Fixes:	5533c5046a ifconfig.8: Update -l synopsis
MFC after:	3 days

(cherry picked from commit 632ea8ea98)
2022-06-29 10:15:50 +02:00
Mateusz Piotrowski aff0be6e66 ifconfig.8: Update -l synopsis
The -g flag can be used together with the -l flag.

MFC after:	2 weeks

(cherry picked from commit 5533c5046a)
2022-06-29 10:15:15 +02:00
Mateusz Piotrowski b879d2b81a ifconfig.8: Document "ifconfig -g groupname"
"ifconfig -g groupname" prints a list of interface names,
which could be confusing, because it differs from
the behavior of "ifconfig -a -g groupname".

While here, add two examples showing the difference between
"ifconfig -a -g groupname" and "ifconfig -g groupname".

Fixes:	0dad3f0e15 Import interface groups from OpenBSD.
MFC after:	2 weeks

(cherry picked from commit 4d91c53a78)
2022-06-29 10:15:14 +02:00
Mateusz Piotrowski ab18258233 ifconfig.8: Remove commented-out Xr eon 5
This reference has been present in the manual page since the initial
import of BSD 4.4 Lite sbin Sources. It's time for it to be removed.

MFC after:	2 weeks

(cherry picked from commit e57f6630d9)
2022-06-29 10:15:14 +02:00
Mateusz Piotrowski 0c29dd8c58 ifconfig.8: Remove remaining Xerox Network Systems(tm) bits
Support for Xeros Network Systems seems to be long gone. There is no
reason to keep this in the manual page.

MFC after:	2 weeks

(cherry picked from commit 1969cc7bdc)
2022-06-29 10:15:13 +02:00
Mateusz Piotrowski a64829040f ifconfig.8: Simplify examples by using canonical parameters
Also, use Bd instead of Dl for multi line examples.

MFC after:	2 weeks

(cherry picked from commit 19ac0bc5c1)
2022-06-29 10:15:12 +02:00
Mateusz Piotrowski b6bcef4b77 ifconfig.8: Mark address_family as optional in synopsis
Commands like "ifconfig wlan0 up" are valid. There is no need to always
specify the address family.

MFC after:	2 weeks

(cherry picked from commit 2cd28d6f9b)
2022-06-29 10:15:12 +02:00
Mateusz Piotrowski fb40141d2b ifconfig.8: Improve description of the address argument
- Split paragraphs for clarity.
- Add an example of setting a random MAC address.

MFC after:	2 weeks

(cherry picked from commit 3049aac91b)
2022-06-29 10:15:11 +02:00
Mateusz Piotrowski 233f423174 ifconfig.8: Improve readability of address_family documentation
Also, move the description of the special case of "ifconfig -l ether" to
the description of the -l flag.

MFC after:	2 weeks

(cherry picked from commit ad8cac1229)
2022-06-29 10:15:10 +02:00
Jose Luis Duran c3bf44b542 ifconfig.8: Fix quoting
Obtained from:	67d77afb0d (r69907135)
Fixes:		67d77afb0d ifconfig.8: Do not use ``'' for quoting
MFC after:	2 weeks

(cherry picked from commit 607eed2f84)
2022-06-29 10:15:10 +02:00
Mateusz Piotrowski bff1b019e6 ifconfig.8: Clean up markup of "state" parameter
MFC after:	2 weeks

(cherry picked from commit 388c12e3f4)
2022-06-29 10:09:36 +02:00
Mateusz Piotrowski 13ac48d808 ifconfig.8: Make the -f flag description compact
- Remove extraneous examples
- Apply "-compact" to the list macros so that it is possible to fit the
  definitions of the types and formats in one terminal screen.

MFC after:	2 weeks

(cherry picked from commit 39da6db9bc)
2022-06-29 10:09:31 +02:00
Mateusz Piotrowski 58873b0b07 ifconfig.8: Do not use ``'' for quoting
MFC after:	2 weeks

(cherry picked from commit 67d77afb0d)
2022-06-29 10:09:26 +02:00
Mateusz Piotrowski 8bc09bfe17 ifconfig.8: Clean up the channel parameter description
MFC after:	2 weeks

(cherry picked from commit ce03846373)
2022-06-29 10:09:20 +02:00
Mateusz Piotrowski da24248e87 ifconfig.8: Add section headers to the parameters section
MFC after:	2 weeks

(cherry picked from commit 0e2045b294)
2022-06-29 10:09:17 +02:00
Mateusz Piotrowski b858b51f05 ifconfig.8: Clean up -n documentation
MFC after:	2 weeks

(cherry picked from commit 186a372f24)
2022-06-29 10:09:12 +02:00
Mateusz Piotrowski 9700451442 ifconfig.8: Clean up -k documentation
MFC after:	2 weeks

(cherry picked from commit 9076f99b9b)
2022-06-29 10:09:08 +02:00
Mateusz Piotrowski ac42ad49e3 ifconfig.8: Clean up -C and -v documentation
MFC after:	2 weeks

(cherry picked from commit 59cdaadcf6)
2022-06-29 10:09:00 +02:00
Mateusz Piotrowski de47f6ba4f ifconfig.8: Clean up -l documentation
MFC after: 2 weeks

(cherry picked from commit fe1e3b55f2)
2022-06-29 10:08:53 +02:00
Mateusz Piotrowski a079f92b19 ifconfig.8: Clean up -G & -g documentation
MFC after:	2 weeks

(cherry picked from commit 787599088b)
2022-06-29 10:08:32 +02:00
Mateusz Piotrowski 3087eb5222 ifconfig.8: Clean up documentation of -a, -d, and -u
MFC after:	2 weeks

(cherry picked from commit 0625c31391)
2022-06-29 10:06:20 +02:00
Mateusz Piotrowski e3c323d099 ifconfig.8: Clean up -L documentation
MFC after:	2 weeks

(cherry picked from commit 19c1b75f71)
2022-06-29 10:06:08 +02:00
Mateusz Piotrowski 68464cec25 ifconfig.8: Clean up -m documentation
MFC after: 2 weeks

(cherry picked from commit b56e4224e9)
2022-06-29 10:05:53 +02:00
Mateusz Piotrowski 5fa8bc5a5e ifconfig.8: Clean up formatting of -f documentation
This change is about moving the -f documentation into the right place in
the manual. Also, document the IFCONFIG_FORMAT variable in the
ENVIRONMENT section.

MFC after:	2 weeks

(cherry picked from commit f4f02fa1e3)
2022-06-29 10:05:45 +02:00
Mateusz Piotrowski 7a219d5cea ifconfig.8: Move options sections to the top
In order to clean up the layout of the manual page, let's keep
parameters in the end of the DESCRIPTION section. This patch does not
change any content, it's meant to only move the content around before
refactoring.

MFC after:	2 weeks

(cherry picked from commit f15eed7c2a)
2022-06-29 10:05:31 +02:00
Mateusz Piotrowski c58c22d2fb ifconfig.8: Deduplicate groupname documentation
-G and -g flags are already described somewhere else in the manual.

MFC after:	2 weeks

(cherry picked from commit 12a774649a)
2022-06-29 10:04:51 +02:00
Mitchell Horne a8f5d758c4 savecore: add an option to save a live minidump
The new '-L' flag will cause savecore to invoke the new mem(4) kernel
dump ioctl, taking a dump of the running system and writing the result
to a temporary file. Validation of the dump header is performed, similar
to regular crash dumps, and the final result is written to
livecore.X[.zst|.gz].

Also added is the '-Z' flag, which instructs the kernel to compress the
livedump compressed with zstd, akin to the existing -z flag. This option
has no effect in normal savecore(8) operation, but in theory could be
extended to perform such compression while reading the dump from the
dump device.

Encryption is unsupported for live dumps.

For example: 'savecore -Lz /var/crash' would create:
/var/crash/livecore.0.gz

Reviewed by:	markj
MFC after:	2 weeks
Sponsored by:	Juniper Networks, Inc.
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D34347

(cherry picked from commit 0a5c04a892)
2022-06-27 16:32:06 -03:00
Zhenlei Huang f636f38bd7 ifconfig.8: reflect removal of FDDI and Token Ring
Reviewed By:	pauamma
Differential Revision: https://reviews.freebsd.org/D35409

(cherry picked from commit 030f3ee995)
2022-06-20 23:06:10 +01:00
Rick Macklem 667c782baa mount_nfs: Only create a mounttab file entry is nmount(2) succeeds
mount_nfs creates entries in the mounttab file and umount removes
them.  Entries in the mounttab file ae used by rpc.umntall to
notify the NFS server that NFSv3 entries need to be removed when
they have not been removed by umount.

Without this patch, an enty will be created in the mounttab file,
even if the nmount(2) syscall fails for the mount.  This patch
modifies the code so that the mounttab entry is only created
after nmount(2) succeeds.

This change only affects NFSv3 and only affects how showmount
displays NFSv3 mounts.

(cherry picked from commit 7cab630ba4)
2022-06-11 12:50:33 -07:00
Gordon Bergling d81e696d2a nvmecontrol(8): Fix a typo in an error message
- s/insufficent/insufficient/

(cherry picked from commit e2dfabb589)
2022-06-10 14:27:21 +02:00
Zhenlei Huang 02fe448437 devfs.rules: Do not expose "log" in the default devfs rules.
/etc/rc.d/jail no longer creates /dev/log as a symbolic link since
commit 84b354cb9a.

PR:		228351
Reviewed by:	jamie, markj

(cherry picked from commit 2670ea8a07)
2022-06-06 20:29:58 -04:00
Mitchell Horne 8fab6c4849 dumpon: warn if the configured netdump link is down
Previously we expected the DIOCSKERNELDUMP ioctl to return ENXIO if the
interface was down, but it does not actually do this. Grab the link
status using getifaddrs(3) instead, and downgrade this case from an
error to a warning; the user might bring the link back up at a later
time.

Reviewed by:	cem
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D35196

(cherry picked from commit 6543fa5a5c)
2022-05-27 13:22:48 -03:00
Mike Karels a1cd2f5d83 ping: add missing test files to Makefile
Should fix ATF tests after 5af718a592.

(cherry picked from commit a30eee517d)
2022-05-27 07:12:04 -05:00
Mike Karels e23a0f521f ping: if -S srcaddr uses a numeric address, use that protocol
The command "ping -S dotted.quad hostname" fails on dual-stack hosts
with the confusing message "ping: invalid source address: Name does
not resolve" because IPv6 is selected in preference.  If the argument
to -S is numeric (likely), select the corresponding address family,
as if -4 or -6 was specified.  Add tests that either IPv4 or IPv6 can
be forced via a -S parameter.

Reviewed by:	asomers
Differential Revision: https://reviews.freebsd.org/D35271

(cherry picked from commit 5af718a592)
2022-05-27 07:11:46 -05:00
Mark Johnston 9f093bf1e8 newfs_msdos: Fix warnings that arise when compiled for makefs
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit f775c417fd)
2022-05-24 09:51:27 -04:00
Alan Somers 2737e6bca7 fusefs: use the fsname mount option if set
The daemon can specify fsname=XXX in its mount options.  If so, the file
system should report f_mntfromname as XXX during statfs.  This will show
up in the output of commands like mount and df.

Submitted by:	Ali Abdallah <ali.abdallah@suse.com>
Differential Revision:	https://reviews.freebsd.org/D35090

(cherry picked from commit 2f6362484c)
2022-05-23 13:11:11 -06:00