Commit graph

9835 commits

Author SHA1 Message Date
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
Eugene Grosbein 6af5ab1bb4 ipfw.8: MFC: spell "layer2" consistently throughout the manual page
(cherry picked from commit 9d7cefc278)
2022-05-21 09:10:04 +07:00
John Baldwin 6835ace580 setkey(8): Clarify language around AEAD ciphers.
AEAD ciphers for IPsec combine both encryption and authentication.  As
such, ESP configurations using an AEAD cipher should not use a
seperate authentication algorithm via -A.  However, this was not
apparent from the setkey manpage and 12.x and earlier did not perform
sufficient argument validation permitting users to pair an explicit -A
such as SHA256-HMAC with AES-GCM.  (The result was a non-standard
combination of AES-CTR with the specified MAC, but with the wrong
initial block counter (and thus different keystream) compared to using
AES-CTR as the cipher.)

Attempt to clarify this in the manpage by explicitly calling out AEAD
ciphers (currently only AES-GCM) and noting that AEAD ciphers should
not use -A.

While here, explicitly note which authentication algorithms can be
used with esp vs esp-old.  Also add subsection headings for the
different algorithm lists and tidy some language.

I did not convert the tables to column lists (Bl -column) though that
would probably be more correct than using literal blocks (Bd
-literal).

PR:		263379
Reviewed by:	Pau Amma <pauamma@gundo.com>, markj
Differential Revision:	https://reviews.freebsd.org/D34947

(cherry picked from commit e6dede1456)
2022-05-19 17:35:34 -07:00
Eugene Grosbein 9132c793cb setkey(8): MFC: load ipsec.ko automatically
If setkey(8) is used without ipsec.ko loaded beforehand,
its attempt to install SA/SPD into the kernel results in cryptic
EINVAL error code.

Let it be a bit more user-friendly and try to load ipsec.ko
automatically if it is not loaded, just like ifconfig(8) does it
for modules it needs.

PR:		263379

(cherry picked from commit 0aef862845)
2022-05-19 13:05:30 +07:00
Mina Galić c3c44de5f0 pkgbase: move devd's hyperv.conf to hyperv-tools package
This devd config file is useless without hyperv-tools, so we're moving
it into the hyperv-tools package. pr#263691

PR:		263691
MFC after:	3 days

(cherry picked from commit 7ac164dc8e)
2022-05-16 17:25:23 +02:00
Mitchell Horne 0decce4326 savecore: factor out info file handling
Move it to a separate function, allowing its reuse.

Reviewed by:	markj
MFC after:	3 days
Sponsored by:	Juniper Networks, Inc.
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D34822

(cherry picked from commit cf02cf8dbf)
2022-05-16 10:34:03 -03:00
Mitchell Horne 274e8fff31 savecore: decrease filename buffer sizes
All files are now created relative to savedirfd, e.g. with openat(2).
Therefore, we do not need character buffers to be PATH_MAX bytes long,
just long enough to hold the complete filename. 32 bytes is long enough
in all cases. These can be allocated on the stack.

While here, fix an error message that attempts to use an uninitialized
infoname.

Reviewed by:	markj
MFC after:	3 days
Sponsored by:	Juniper Networks, Inc.
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D34821

(cherry picked from commit fafeb5342b)
2022-05-16 10:34:03 -03:00
Mitchell Horne 1961b46059 savecore: fold maxdumps check into getbounds()
So that new callers of getbounds() don't need to duplicate it.

Reviewed by:	markj
MFC after:	3 days
Sponsored by:	Juniper Networks, Inc.
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D34783

(cherry picked from commit 4243d307d3)
2022-05-16 10:34:03 -03:00
Alexander Motin 5f6a3a81f6 GEOM: Introduce partial confxml API
Traditionally the GEOM's primary channel of information from kernel to
user-space was confxml, fetched by libgeom through kern.geom.confxml
sysctl.  It is convenient and informative, representing full state of
GEOM in a single XML document.  But problems start to arise on systems
with hundreds of disks, where the full confxml size reaches many
megabytes, taking significant time to first write it and then parse.

This patch introduces alternative solution, allowing to fetch much
smaller XML document, subset of the full confxml, limited to 64KB and
representing only one specified geom and optionally its parents.  It
uses existing GEOM control interface, extended with new "getxml" verb.
In case of any error, such as the buffer overflow, it just transparently
falls back to traditional full confxml.  This patch uses the new API in
user-space GEOM tools where it is possible.

Reviewed by:	imp
MFC after:	2 month
Sponsored by:	iXsystems, Inc.
Differential Revision:	https://reviews.freebsd.org/D34529

(cherry picked from commit 7f16b501e2)
2022-05-10 21:20:25 -04:00
John Baldwin e6c88ad350 ggatec: Use ANSI C definition for init_initial_buffer_size.
This fixes -Wstrict-prototypes and -Wold-style-definition warnings
from GCC 9.

(cherry picked from commit 6c9ed42828)
2022-05-10 17:04:10 -07:00
John Baldwin a23f4ab7a1 mount: Don't pass a NULL format string to xo_err().
This fixes a -Wformat error from GCC 9.

Fixes:		e725ee7eb6 mount: add libxo(3) support
(cherry picked from commit 9d324b5ffc)
2022-05-10 15:51:49 -07:00
Matteo Riondato 407f7397d6 pfctl: fix recursive printing of rules
When asked to print rules recursively, correctly recurse for anchors
included in pf.conf with "anchorname/*".

PR:		262590
Reviewed by:	kp
MFC after:	3 weeks

(cherry picked from commit d86cf44350)
2022-05-04 08:20:58 +02:00
Gordon Bergling b6ab9fc601 fsck_ffs(8): Fix a typo in a source code comment
- s/it it/if it/

(cherry picked from commit 299fcf402d)
2022-04-14 08:16:23 +02:00
Gordon Bergling 6eef2e6425 ipnat(5): Fix a double word in the manual page
- s/be be/be/

(cherry picked from commit d7958fe1bc)
2022-04-14 08:14:37 +02:00
Gordon Bergling 6d14451326 hastd(8): Fix a typo in a source code comment
- s/proccesses/processes/

(cherry picked from commit b95a6ecffa)
2022-04-14 08:12:19 +02:00
Gordon Bergling 40ca30e71a dhclient(8): Fix a typo in a source code comment
- s/explicitely/explicitly/

(cherry picked from commit a06052d623)
2022-04-14 08:08:13 +02:00