Commit graph

9825 commits

Author SHA1 Message Date
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
Gordon Bergling dcf7f03b84 umount(8): Remove a double word in a source code comment
- s/this this/this/

(cherry picked from commit efb45ad024)
2022-04-14 08:06:55 +02:00
Gordon Bergling b631c429bb routed(8): Remove a double word in a source code comment
- s/it it/it/

(cherry picked from commit 009727ed57)
2022-04-14 07:58:53 +02:00
Robert Wing 7472cae2e0 mount.8: mention that the snapshot option is exclusive
When using the snapshot option, all other options are ignored. This
update reflects changes made in ab2dbd9b87.

Reviewed by:	0mp, mckusick
Differential Revision:	https://reviews.freebsd.org/D34584

(cherry picked from commit 8772a9117b)
2022-04-13 13:00:22 -08:00
Mateusz Piotrowski 0ae09fb966 ifconfig.8: Document that -k can be used with -a
MFC after:	2 weeks

(cherry picked from commit b710d4c85a)
2022-04-12 16:35:52 +02:00
Mateusz Piotrowski 1a5bc3f735 ifconfig.8: Improve -f synopsis
- There is no need to mention in the synopsis that -f can be a list of
  comma-separated type:format pairs. Let's keep it simple instead.
- Mention that -f can be supplied multiple times.
- Add -f to other entries in the synopsis where it can be used.

MFC after:	2 weeks

(cherry picked from commit 52ec8807d8)
2022-04-12 16:35:51 +02:00
Mateusz Piotrowski 1696f62771 ifconfig.8: Document the synopsis of -C
As documented, the -C flag can only be used on its own. Any other
command modifiers and flags are ignored when -C is used. Reflect that in
synopsis.

MFC after:	2 weeks

(cherry picked from commit efb4f7fd09)
2022-04-12 16:35:51 +02:00
Mateusz Piotrowski 624882f6b4 ifconfig.8: Show that -g groupname can be used on its own
MFC after:	2 weeks

(cherry picked from commit a9475cb389)
2022-04-12 16:35:50 +02:00
Mateusz Piotrowski 2506267cd6 ifconfig.8: Cluster together short flags
MFC after:	2 weeks

(cherry picked from commit 2e053399fc)
2022-04-12 16:35:49 +02:00
Mateusz Piotrowski a197457157 ifconfig.8: Add capability codes descriptions from handbook
We document capability codes (the CAPS field of "ifconfig wlan0 scan")
in both ifconfig(8) and the handbook. The list is more complete in the
manual page, while the descriptions of individual capabilities are more
detailed in the handbook.

In order to reduce content duplication and bit rot, let's move
handbook's details to the manual page and reference the manual page
whenever necessary.

Reviewed by:	debdrup
Reviewed by:	Pau Amma
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D34662

(cherry picked from commit 05621e0b20)
2022-04-12 16:35:49 +02:00
Reid Linnemann 14c4c1d01e libpfctl: relocate implementations of pfr_add/get/set_addrs
Reviewed by:	kp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D34740

(cherry picked from commit 4823489ab6)
2022-04-11 16:52:34 +02:00