Commit Graph

9521 Commits

Author SHA1 Message Date
Gordon Bergling
e5a84dc8a7 dumpon(8): Add missing section arguments
MFC after:	3 days
2020-12-28 16:48:58 +01:00
Gordon Bergling
e13534d54a newfs(8): Fix unusual Xr order
- unusual Xr order: gjournal after gpart

MFC after:	3 days
2020-12-28 16:46:28 +01:00
Xin LI
804b4afb9c sbin/init: Reduce code duplication by using %m for error message
instead of passing %s with return value from strerror().

MFC after:	2 weeks
2020-12-25 17:49:33 -08:00
Xin LI
7e75718295 sbin/routed: Remove unused code for sgi and NetBSD.
MFC after:	2 weeks
2020-12-25 17:42:47 -08:00
Rick Macklem
79302a6304 mount_nfs(8): add a description for the new "tlscertname" option
commit 665b1365fe added a new NFS mount option that is used to set a
non-default X.509 certificate, that can be used for nfs-over-tls NFS
mounts.
This patch adds a description for it to the man page.

Reviewed by:		0mp
Differential Revision:	https://reviews.freebsd.org/D27733
2020-12-24 14:20:06 -08:00
Ryan Moeller
401f82df48 sbin/sysctl: Style fix
Remove parameter names from function prototype to match other
prototypes in the file.

Sponsored by:	iXsystems, Inc.
2020-12-23 12:45:11 -05:00
Ryan Moeller
a5ec1dd453 sbin/sysctl: Always honor skip in sysctl_all
Fix broken CTLFLAG_SKIP when present on the first child of the requested
node.

We don't need to ignore skip for the first node because in sysctl_all()
we've implicitly visited the first node already when oid is specified.
The first call to show_var() in here is after we have iterated to the
next node. When the command line specifically requests a non-node sysctl
we go straight into show_var() without calling sysctl_all().

Reported by:	jhb
Reviewed by:	jhb
Sponsored by:	iXsystems, Inc.
Differential Revision:	https://reviews.freebsd.org/D27674
2020-12-23 12:42:38 -05:00
Gordon Bergling
bae74ca922 ipfw(8): Fix a few mandoc related issues
- no blank before trailing delimiter
- missing section argument: Xr inet_pton
- skipping paragraph macro: Pp before Ss
- unusual Xr order: syslogd after sysrc
- tab in filled text

There were a few multiline NAT examples which used the .Dl macro with
tabs. I converted them to .Bd, which is a more suitable macro for that case.

MFC after:	1 week
2020-12-19 12:47:40 +00:00
Gordon Bergling
ea0dd3ca44 ping(8): Fix a mandoc related issue
- unusual Xr punctuation: none before traceroute6(8)
2020-12-19 11:57:47 +00:00
Gordon Bergling
9bca273d84 nvmecontrol(8): Fix a few mandoc related issues and add a SEE ALSO section
- inserting missing end of block: Ss breaks Bl
- skipping paragraph macro: Pp before Ss
- referenced manual not found: Xr nvme 4 (2 times)
- unknown standard specifier: St The

The macro .St can only be used for standards known by mdoc(7). So add a
SEE ALSO section and add a reference to the NVM Express Base Specification.

MFC after:	2 weeks
2020-12-19 11:47:38 +00:00
Gordon Bergling
226f43e757 devd.conf(5): Fix a mandoc related issue
- sections out of conventional order: Sh SEE ALSO

MFC after:	1 week
2020-12-19 11:03:04 +00:00
Kirk McKusick
7180f1ab40 Rename pass4check() to freeblock() and move from pass4.c to inode.c.
The new name more accurately describes what it does and the file move
puts it with other similar functions. Done in preparation for future
cleanups. No functional differences intended.

Sponsored by: Netflix
Historic Footnote: my last FreeBSD svn commit
2020-12-18 23:28:27 +00:00
Robert Wing
f200cc255f geom(8): list geoms with /dev/ prefix
Allow geom(8) to list geoms with the '/dev/' prefix.

`geom part show` accepts the '/dev/' prefix but `geom part list` does not.

Modify find_geom() in sbin/geom/core/geom.c to be consistent with the behavior
of find_geom() in lib/geom/part/geom_part.c.

PR:             188213
Reported by:    Ronald F. Guilmette <rfg@tristatelogic.com>
Reviewed by:    imp, kevans
Approved by:    kevans (mentor)
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D27556
2020-12-12 07:22:38 +00:00
Ryan Libby
61261ef589 savecore: bail on write error even when decompressing
Reviewed by:	markj
Sponsored by:	Dell EMC Isilon
Differential Revision:	https://reviews.freebsd.org/D27560
2020-12-11 22:52:12 +00:00
Eric van Gyzen
4617b1f62b decryptcore: preload OpenSSL error strings; seed PRNG
As in r360226, preload OpenSSL error strings and seed the PRNG
before entering capability mode.

MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2020-12-11 14:32:42 +00:00
Hans Petter Selasky
21f5dc86d3 Fix bug in ifconfig preventing proper VLAN creation.
Detection of interface type by filter must happen before detection of
interface type by prefix. Else the following sequence of commands will
try to create a LAGG interface instead of a VLAN interface, which
accidentially worked previously, because the date pointed to by the
ifr_data pointer was not parsed by VLAN create ioctl(2). This is a
regression after r368229, because the VLAN creation now parses the
ifr_data field.

How to reproduce:
# ifconfig lagg0 create
# ifconfig lagg0.256 create

Differential Revision:	https://reviews.freebsd.org/D27521
Reviewed by:		kib@ and kevans@
Reported by:		raul.munoz@custos.es
Sponsored by:		Mellanox Technologies // NVIDIA Networking
2020-12-09 20:13:12 +00:00
Kyle Evans
b8f71f9750 bectl: simplify the tail end of the jail cmd
This has already confused me once (and I'm pretty sure I wrote it), so let's
clarify: unjailing after the command has completed will only happen if we're
interactive and -U has not been specified.

This just folds two conditionals together to make it obvious how -b/-U
interact with each other.

MFC after:	3 days
2020-12-06 15:58:50 +00:00
Gordon Bergling
4ddfc27e14 ping(8): Fix a few mandoc related issues
- new sentence, new line
2020-12-04 20:47:56 +00:00
Gleb Smirnoff
3921dc1304 Fix r368197: suppress error printing for the "check" command.
Reviewed by:	kevans
2020-12-02 21:53:28 +00:00
Rick Macklem
00c8b28c1a Improve man page for AmazonEFS mounts.
PR#250770 was actually just a misunderstanding of what
NFS mount options are needed for AmazonEFS mounts.
This patch attempts to clarify the manpage to clarify this.

This is a content change.

PR:		250770
Reviewed by:	bcr
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D27430
2020-12-01 23:33:10 +00:00
John-Mark Gurney
4102e8385f add documentation that the rules need to be reloaded, and how to do it...
MFC after:	1 week
2020-12-01 23:25:21 +00:00
Gleb Smirnoff
4c91d6bc44 Print at least something when failing. 2020-11-30 21:05:31 +00:00
Matt Macy
2338da0373 Import kernel WireGuard support
Data path largely shared with the OpenBSD implementation by
Matt Dunwoodie <ncon@nconroy.net>

Reviewed by:	grehan@freebsd.org
MFC after:	1 month
Sponsored by:	Rubicon LLC, (Netgate)
Differential Revision:	https://reviews.freebsd.org/D26137
2020-11-29 19:38:03 +00:00
Eugene Grosbein
1c86e81196 hastd(8) assumes it has no extra file descriptors opened
and aborts otherwise, so call closefrom() early.

PR:		227461
MFC after:	2 weeks
2020-11-29 13:45:53 +00:00
Alan Somers
fd26389be7 ping: allow building without INET support
Building without INET6 support was already possible. Now it's possible to
build ping with only INET6, or even with neither INET nor INET6.

Reported by:	bz
Reviewed by:	bz
MFC-With:	368045
Differential Revision:	https://reviews.freebsd.org/D27394
2020-11-28 23:24:19 +00:00
Alan Somers
d262451715 ping: add a ping6 hard link for backwards compatibility
When invoked as "ping6", ping will now attempt to use ICMPv6 for hostnames
that resolve both IPv4 and IPv6 addresses.

Reviewed by:	bz, manu
MFC-With:	r368045
Differential Revision:	https://reviews.freebsd.org/D27384
2020-11-26 18:33:04 +00:00
Hans Petter Selasky
05952067bb Ensure consistent error messages from ifconfig(8).
If multiple threads are invoking "ifconfig XXX create" a race may occur
which can lead to two different error messages for the same error.

a) ifconfig: SIOCIFCREATE2: File exists
b) ifconfig: interface XXX already exists

This patch ensures ifconfig prints the same error code
for the same case.

Reviewed by:	imp@ and kib@
Differential Revision:	https://reviews.freebsd.org/D27380
MFC after:	1 week
Sponsored by:	Mellanox Technologies // NVIDIA Networking
2020-11-26 16:36:50 +00:00
Alan Somers
3cde9171d2 Merge ping6 to ping
There is now a single ping binary, which chooses to use ICMP or ICMPv4
based on the -4 and -6 options, and the format of the address.

Submitted by:	Ján Sučan <sucanjan@gmail.com>
Sponsored by:	Google LLC (Google Summer of Code 2019)
MFC after:	Never
Differential Revision:	https://reviews.freebsd.org/D21377
2020-11-26 04:29:30 +00:00
Mark Johnston
78e1f68ee1 ping(8): Improve parameter validation
- Use strtonum(3) to simplify bounds checking of numeric parameters.
- Fix bounds checking when filling out packet data in "sweep" mode.

PR:		239974, 239977, 239978
Reported by:	Neeraj <neerajpal09@gmail.com>
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D25622
2020-11-24 17:12:40 +00:00
Alan Somers
f998d4c7a2 ping6: update usage text after r365547
MFC after:	2 weeks
2020-11-24 02:51:45 +00:00
Warner Losh
b7169662e3 Prefer Em to Ar for emphasis
Em is better than Ar if all we want to do is underline the text.

Submitted by: yuripv@
2020-11-23 18:37:19 +00:00
Rick Macklem
04914a2195 Document the new "tls" NFS mount option.
Recent commits to head have added support for NFS over TLS
to the FreeBSD kernel.
To enable use of this for an NFS mount, the "tls" mount_nfs
option has been added.

Once the IETF has assigned an RFC number, I will replace "NNNN"
with the number.

This is a content change.

Reviewed by:	gbe
Differential Revision:	https://reviews.freebsd.org/D26262
2020-11-20 22:29:38 +00:00
Gordon Bergling
919c763a49 devmatch(8): Fix section ordering
- sections out of conventional order: Sh HISTORY
2020-11-20 16:34:01 +00:00
Gordon Bergling
c17b2a79bd camcontrol(8): Fix some warnings spotted by mandoc
- skipping paragraph macro: Pp before Bl
2020-11-20 11:45:08 +00:00
Gleb Smirnoff
bc7ed46b63 Add '-u' switch that would uncompress cores that were compressed by
kernel during dump time.

A real life scenario is that cores are compressed to reduce
size of dumpon partition, but we either don't care about space
in the /var/crash or we have a filesystem level compression of
/var/crash. And we want cores to be uncompressed in /var/crash
because we'd like to instantily read them with kgdb. In this
case we want kernel to write cores compressed, but savecore(1)
write them uncompressed.

Reviewed by:	markj, gallatin
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D27245
2020-11-19 02:20:38 +00:00
Stefan Eßer
56d11d4a37 Make use of the getlocalbase() function for run-time adjustment of the
local software base directory, as committed in SVN rev. 367813.

The pkg and mailwrapper programs used the LOCALBASE environment variable
for this purpose and this functionality is preserved by getlocalbase().

After this change, the value of the user.localbase sysctl variable is used
if present (and not overridden in the environment).

The nvmecontrol program gains support of a dynamic path to its plugin
directory with this update.

Differential Revision:	https://reviews.freebsd.org/D27237
2020-11-18 20:00:55 +00:00
Adrian Chadd
44c52406ce [nvmecontrol] Fix type signedness warning-to-error on gcc-6.4
This fixes a type signedness comparison warning-to-error on
gcc-6.4. The ternary operation casts it right but the actual
assignment doesn't.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D26791
2020-11-17 17:12:28 +00:00
Alexander Motin
329327e272 Stop using NVME_MAX_XFER_SIZE constant.
This constant depends on MAXPHYS and does not respect device capabilities.
Use proper dynamic ioctl(NVME_GET_MAX_XFER_SIZE) instead.

MFC after:	1 month
2020-11-17 16:34:58 +00:00
Scott Long
8e1031086d Revert the whole getlocalbase() set of changes while a different design is
hashed out.
2020-11-15 20:24:59 +00:00
Scott Long
1b249101df Fix the previous revision, it suffered from an incomplete change to the
getlocalbase API.  Also don't erroneously subtract the lenth from the
buffer a second time.
2020-11-15 07:50:29 +00:00
Scott Long
7ca0d5403e Replace hardcoded references to _PATH_LOCALBASE with calls to getlocalbase.3
Reviewed by:	imp, se
2020-11-14 18:01:14 +00:00
Alexander Motin
5dc463f9a5 Improve nvmecontrol error reporting.
MFC after:	1 week
Sponsored by:	iXsystems, Inc.
2020-11-13 02:05:45 +00:00
Mateusz Piotrowski
b392c96540 Address a mandoc warning
MFC after:	3 days
2020-11-10 14:17:05 +00:00
Mateusz Piotrowski
8bd4b3f949 Use Cm macros instead of Ar when referring to a specific memory disk type
MFC after:	3 days
2020-11-06 15:55:13 +00:00
Mateusz Piotrowski
f35062c735 Fix a typo and remove Xr's to vn(4) and vnconfig(4)
"mandoc -Tlint" complained about the Xr to vnconfig, which was removed in
r238202.  I am not sure but maybe it's time to do the same to vn(4).

MFC after:	2 weeks
2020-11-06 15:38:51 +00:00
Gleb Smirnoff
32fbec42f5 Style, not functional changes:
- Improve spelling of a false check [1]
- A missing line from r367150.

Submitted by:	kib
2020-11-03 22:04:32 +00:00
Konstantin Belousov
3f113d5606 ifconfig: properly detect invalid mediaopt keywords.
When invalid keyword is specified, ifconfig(8) is silent about it,
instead random request is sent to the driver.

Before the patch:
root@r-freeb43:~ # ifconfig mce0 mediaopt -txpause,-rxpause
ifconfig: SIOCSIFMEDIA (media): Device not configured

After:
root@r-freeb43:~ # ifconfig mce0 mediaopt -txpause,-rxpause
ifconfig: unknown option: -txpause

Reviewed by:	hselasky, kp
Sponsored by:	Mellanox Technologies / NVidia Networking
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D27060
2020-11-02 21:47:34 +00:00
Mateusz Piotrowski
a257740767 ifconfig.8: Improve formatting of -f in synopsis
MFC after:	3 days
2020-11-01 22:50:21 +00:00
Mateusz Piotrowski
44c4affa00 Remove Tn macros from ifconfig.8
MFC after:	3 days
2020-11-01 22:46:43 +00:00
Vladimir Kondratyev
3bdb684633 devmatch(8): Respect mask field when matching strings of Z type.
While here, add debug output for this action.

Reviewed by:	imp
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D26823
2020-10-31 22:04:13 +00:00