Commit graph

9803 commits

Author SHA1 Message Date
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
Mitchell Horne 3a64c08ceb savecore: include '-u' flag in usage message
Reported by:	Pau Amma <pauamma@gundo.com>
Fixes		bc7ed46b63 ("Add '-u' switch that would...")
MFC after:	3 days

(cherry picked from commit 173fc6f456)
2022-04-11 11:04:08 -03:00
Ed Maste fbc0c2a21b dumpon: proceed without compression if the kernel lacks support
PR:		252554
Reviewed by:	markj
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D34520

(cherry picked from commit 2b20327ec9)
2022-04-10 19:12:30 -04:00
Gordon Bergling 52adfd8e15 devd(8): Fix a typo in a configuration file
- s/coresponding/corresponding/

(cherry picked from commit e09d161bd9)
2022-04-09 08:18:46 +02:00
Gordon Bergling b2f08f92a0 ipf(5): Fix a typo in the manual page
- s/accomodate/accommodate/

(cherry picked from commit 8a3568b584)
2022-04-09 08:10:37 +02:00
Kyle Evans 227e52a9c0 bectl: push space-in-name check down into libbe
This check was previously in `create` only, not applying to renames.  It
should really be applied at the libbe level, so that we can avoid
writing about this restriction over and over again.

While we're here: `bectl rename` always succeeds, even when it doesn't.
Start returning the error.

Reported By:	Christian McDonald <cmcdonald netgate com>

(cherry picked from commit dadb9c7093)
2022-04-05 22:37:07 -05:00
Kyle Evans 0e90da6549 bectl: add some discussion about boot environment layouts
Discuss the standard type of layout, as well as the "deep" BE layout,
and some of the properties of both.  Point the various -r flags at this
new section, to help users understand which they're working with and
what the -r flag is actually doing. Note that we may just deprecate the
-r flag in future versions, but the flag will be recognized as a NOP at
that point.

(cherry picked from commit c0f846ff23)
2022-04-05 22:37:07 -05:00
Alexander Motin 59c15b83be geom: Allow "load" command for already loaded modules.
I see more user-friendly to do nothing if the module is already
loaded, rather than returning quite confusing error message.

As side effect it allows to avoid std_list_available() call, using
quite expensive on large systems geom_gettree().

MFC after:	1 month

(cherry picked from commit 5678114cd8)
2022-04-05 22:07:40 -04:00
Alexander Motin 4340533721 GEOM: Introduce gctl_add_param() API.
Make gctl_add_param() API public, allowing more precise control over
parameter flags.  Previously it was impossible to properly declare
write-only ASCII parameters, used for result reporting, they were
declared as read-write binary instead, that was not nice.

MFC after:	1 month

(cherry picked from commit 2117cdd4b4)
2022-04-05 22:07:40 -04:00
Mateusz Piotrowski 39289f6127 Cross-reference nextboot(8) and freebsd-update(8)
MFC after:	1 week

(cherry picked from commit 075999d3f1)
2022-04-05 16:08:43 +02:00
Mateusz Piotrowski 69c70456e8 ifconfig.8: Simplify -G & -g synopsis
MFC after:	1 week

(cherry picked from commit d1d14f0428)
2022-04-05 16:08:43 +02:00
Colin Percival 7d160dc9a1 sysctl(8): Mention CTLFLAG_SKIP
`sysctl -a` does not print values with this flag.

Reviewed by:	debdrup
Differential Revision:	https://reviews.freebsd.org/D34615

(cherry picked from commit 1dee7c74d1)
2022-04-04 12:11:36 -07:00
Gordon Bergling 498b49fee3 pfctl(8): Fix a typo in a comment
- s/steping/stepping/

(cherry picked from commit 2fa6223aaa)
2022-04-02 15:34:36 +02:00
Gordon Bergling 9dcb2e62c8 geom(4): Fix a typo in a source code comment
- s/comand/command/

(cherry picked from commit 407a0eac79)
2022-04-02 15:32:00 +02:00
Gordon Bergling 8b67abf317 mount(8): Fix a typo in source code comments
- s/filesytem/filesystem/

(cherry picked from commit c09770b2cd)
2022-04-02 15:29:58 +02:00
Mateusz Piotrowski 30a1d38e6c *: Do not use the no-op -r flag for bsdlabel(8)
The -r flag is ignored by the FreeBSD implementation of bsdlabel(8)
(also called disklabel(8) in the past). Remove its use from examples
and tests in the tree.

This commit does not touch historical documentation under share/doc/smm
and files under contrib/netbsd-tests.

Reviewed by:	imp
MFC after:	2 weeks
Approved by:	imp (src)
Fixes:		57dfbec57b More axe-work:
Differential Revision:	https://reviews.freebsd.org/D34585

(cherry picked from commit fd06117525)
2022-03-31 09:37:03 +02:00
Warner Losh cba6eb5d31 devd: Add rtw to wireless list
rtw88 and rtw89 are coming soon, so add them here now

Sponsored by:		Netflix
MFC After:		1 day

(cherry picked from commit dea368bc5e)
2022-03-29 09:43:55 -06:00
Alexander V. Chernikov b5b97a95aa ifconfig: remove debug printf introduced in 779fd05344
Reported by:	jhb

(cherry picked from commit 656f5031c3)
2022-03-28 08:50:21 +00:00
Alexander V. Chernikov 157bf2c996 ifconfig: improve vlan options parsing
PR:	261136
Reported by:	Daniel O'Connor
MFC after:	2 weeks

(cherry picked from commit 779fd05344)
2022-03-28 08:50:12 +00:00
Kristof Provost 73b72d4a71 pfctl: fix retrieving nested nat-anchors
When retrieving nat rules in anchors we need to set the path just like
we do for regular rules.

MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")

(cherry picked from commit a632d9e360)
2022-03-24 10:44:48 +01:00
Matteo Riondato 5567b132a4 pfctl: fix retrieving nested anchors
PR:		262622
MFC after:	1 week
Reviewed by:	kp

(cherry picked from commit cd8438e5a3)
2022-03-24 10:44:31 +01:00
Piotr Pawel Stefaniak c4e1fbfe56 mount: make libxo support more locale-aware
"special", "node", and "mounter" are not guaranteed to be encoded with
UTF-8. Use the appropriate modifier.

(cherry picked from commit 260f26f035)
2022-03-23 16:48:03 +01:00
Cameron Katri 3f8b52c910 mount: add libxo(3) support
Adds --libxo to mount(8).

(cherry picked from commit e725ee7eb6)
2022-03-23 16:47:33 +01:00