aboutsummaryrefslogtreecommitdiff
path: root/sbin
Commit message (Collapse)AuthorAgeFilesLines
* makefs: avoid warning when creating FAT filesystem on existing fileEd Maste2019-11-081-0/+2
| | | | | | | | | | | | | | Previously the mkfs_msdos function (from newfs_msdos) emitted warnings in the case that an image size is specified and the target is not a file, or no size is specified and the target is not a character device. The latter warning (not a character device) doesn't make sense when this code is used in makefs, regardless of whether an image size is specified or not. Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=354537
* mdmfs(8): add -k skel option to populate fs from a skeletonKyle Evans2019-11-012-5/+35
| | | | | | | | | | | | | | | | | | | | | | | mdmfs(8) lacks the ability to populate throwaway memory filesystems from an existing directory. This features permits an interesting setup where /var for instance lives on a device where wear-leveling is something you want to avoid as much as possible and nonetheless you don't want to lose your logs, ports metadata, etc. Here are the steps: 1. Copy /var to /var.bak; 2. Mount an mfs into /var using -k /var.bak at startup; 3. Synchronize /var to /var.bak weekly and on shutdown. Note that this more or less mimics OpenBSD's mount_mfs(8) -P flag. PR: 146254 Submitted by: jlh (many moons ago) MFC after: 1 week Notes: svn path=/head/; revision=354236
* Replace an uninitialized variable with the correct element from theKirk McKusick2019-10-221-1/+1
| | | | | | | | | | | superblock when doing recovery with journalled soft updates. Reported by: Chuck Silvers MFC after: 3 days Sponsored by: Netflix Notes: svn path=/head/; revision=353903
* Fix option names in the Examples section of the manual pageAlan Somers2019-10-201-3/+3
| | | | | | | | | | | This corrects an oversight from r351423. Submitted by: Ján Sučan <sucanjan@gmail.com> MFC after: Never Differential Revision: https://reviews.freebsd.org/D22093 Notes: svn path=/head/; revision=353779
* ddb: use 'textdump dump' instead of 'call doadump'Andriy Gapon2019-10-181-1/+1
| | | | | | | | | | | | | | | | | The change is for the example in textdump.4 and the default ddb.conf. First of all, doadump now requires an argument and it won't do a textdump if the argument is not 'true'. And 'textdump dump' is more idiomatic anyway. For what it's worth, ddb 'dump' command seems to always request a vmcore dump even if a textdump was requested earlier, e.g., by 'textdump set'. Finally, ddb 'call' command is not documented. MFC after: 2 weeks Notes: svn path=/head/; revision=353726
* bectl(8): destroy: use BE_DESTROY_AUTOORIGIN if -o is not specifiedKyle Evans2019-10-161-1/+3
| | | | | | | | | | | | -o will force the origin to be destroyed unconditionally. BE_DESTROY_AUTOORIGIN, on the other hand, will only destroy the origin if it matches the format used by be_snapshot. This lets us clean up the snapshots that are clearly not user-managed (because we're creating them) while leaving user-created snapshots in place and warning that they're still around when the BE created goes away. Notes: svn path=/head/; revision=353646
* Explicitly initialize the memory buffer to store O_ICMP6TYPE opcode.Andrey V. Elsukov2019-10-151-0/+1
| | | | | | | | | | | | | | | | By default next_cmd() initializes only first u32 of opcode. O_ICMP6TYPE opcode has array of bit masks to store corresponding ICMPv6 types. An opcode that precedes O_ICMP6TYPE, e.g. O_IP6_DST, can have variable length and during opcode filling it can modify memory that will be used by O_ICMP6TYPE opcode. Without explicit initialization this leads to creation of wrong opcode. Reported by: Boris N. Lytochkin Obtained from: Yandex LLC MFC after: 3 days Notes: svn path=/head/; revision=353545
* add ability to set watchdog timeout for a shutdownAndriy Gapon2019-10-031-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change allows to specify a watchdog(9) timeout for a system shutdown. The timeout is activated when the watchdogd daemon is stopped. The idea is to a prevent any indefinite hang during late stages of the shutdown. The feature is implemented in rc.d/watchdogd, it builds upon watchdogd -x option. Note that the shutdown timeout is not actiavted when the watchdogd service is individually stopped by an operator. It is also not activated for the 'shutdown' to the single-user mode. In those cases it is assumed that the operator knows what they are doing and they have means to recover the system should it hang. Significant subchanges and implementation details: - the argument to rc.shutdown, completely unused before, is assigned to rc_shutdown variable that can be inspected by rc scripts - init(8) passes "single" or "reboot" as the argument, this is not changed - the argument is not mandatory and if it is not set then rc_shutdown is set to "unspecified" - however, the default jail management scripts and jail configuration examples have been updated to pass "jail" to rc.shutdown, just in case - the new timeout can be set via watchdogd_shutdown_timeout rc option - for consistency, the regular timeout can now be set via watchdogd_timeout rc option - watchdogd_shutdown_timeout and watchdogd_timeout override timeout specifications in watchdogd_flags - existing configurations, where the new rc options are not set, should keep working as before I am not particularly wed to any of the implementation specifics. I am open to changing or removing any of them as long as the provided functionality is the same (or very close) to the proposed one. For example, I think it can be implemented without using watchdogd -x, by means of watchdog(1) alone. In that case there would be a small window between stopping watchdogd and running watchdog, but I think that that is acceptable. Reviewed by: bcr (man page changes) MFC after: 5 weeks Relnotes: yes Differential Revision: https://reviews.freebsd.org/D21221 Notes: svn path=/head/; revision=353039
* Size is unsigned, so remove the test entirely.Warner Losh2019-09-251-4/+0
| | | | | | | | | The kernel won't crash if you have a bad value and I'd rather not have nvmecontrol know the internal details about how the nvme driver limits the transfer size. Notes: svn path=/head/; revision=352671
* After my comnd changes, the number of threads and size weren't set. InWarner Losh2019-09-251-2/+8
| | | | | | | | | | | addition, the flags are optional, but were made to be mandatory. Set these things, as well as santiy check the specified size. Submitted by: Stefan Rink PR: 240798 Notes: svn path=/head/; revision=352665
* ping6: Use caph_rights_limit(3) for STDIN_FILENOMark Johnston2019-09-231-6/+6
| | | | | | | | | | Update some error messages while here. Reported by: olivier MFC after: 3 days Notes: svn path=/head/; revision=352634
* Add two options to allow mount to avoid covering up existing mount points.Sean Eric Fagan2019-09-233-3/+15
| | | | | | | | | | | | | | | | | | | The two options are * nocover/cover: Prevent/allow mounting over an existing root mountpoint. E.g., "mount -t ufs -o nocover /dev/sd1a /usr/local" will fail if /usr/local is already a mountpoint. * emptydir/noemptydir: Prevent/allow mounting on a non-empty directory. E.g., "mount -t ufs -o emptydir /dev/sd1a /usr" will fail. Neither of these options is intended to be a default, for historical and compatibility reasons. Reviewed by: allanjude, kib Differential Revision: https://reviews.freebsd.org/D21458 Notes: svn path=/head/; revision=352614
* ifconfig: add report of the string from SIOCGIFDOWNREASON.Konstantin Belousov2019-09-171-5/+27
| | | | | | | | | | | | | | | | | | | Sample output: # ifconfig mce0 mce0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=3ed07bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWFILTER,VLAN_HWTSO,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6,TXRTLMT,HWRXTSTMP> ether e4:1d:2d:e7:10:0a media: Ethernet autoselect <full-duplex,rxpause,txpause> status: no carrier (Negotiation failure) nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL> Reviewed by: hselasky, rrs Sponsored by: Mellanox Technologies MFC after: 1 week Differential revision: https://reviews.freebsd.org/D21527 Notes: svn path=/head/; revision=352459
* Avoid mixing cluster numbers and sector numbers. Makes code more readable.Xin LI2019-09-153-11/+19
| | | | | | | | Obtained from: NetBSD MFC after: 2 weeks Notes: svn path=/head/; revision=352364
* Remove Tagged Command Queuing feature reporting.Alexander Motin2019-09-121-10/+0
| | | | | | | | | | I never saw those devices myself, FreeBSD never supported them, and it is officially obsolete since ACS-2 specification. MFC after: 3 days Notes: svn path=/head/; revision=352258
* Report Trusted Computing feature set support.Alexander Motin2019-09-121-0/+3
| | | | | | | | | It practically means the device is SED. MFC after: 3 days Notes: svn path=/head/; revision=352257
* ping: Verify whether a datagram timestamp was actually received.Alan Somers2019-09-111-1/+2
| | | | | | | | | | | | | | | | | | ping(8) uses SO_TIMESTAMP, which attaches a timestamp to each IP datagram at the time it's received by the kernel. Except that occasionally it doesn't. Add a check to see whether such a timestamp was actually set before trying to read it. This fixes segfaults that can happen when the kernel doesn't attach a timestamp. The bug has always existed, but prior to r351461 it manifested as an implausible round-trip-time, not a segfault. Reported by: pho MFC after: 3 days MFC-With: 351461 Notes: svn path=/head/; revision=352229
* ping: fix a string in an error messageAlan Somers2019-09-111-1/+1
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=352226
* Assume all the short args have optional args so allocate space for theWarner Losh2019-09-111-1/+1
| | | | | | | | | | ':'. It's slightly wasteful, but much easier (and the savings in bytes at runtime would be tiny, but the code to do it larger). Submitted by: Sebastian Huber Notes: svn path=/head/; revision=352212
* bectl(8): Add a "check" commandKyle Evans2019-09-112-28/+54
| | | | | | | | | | | | | | | | | | | | | This command simply returns 0 at the moment and explicitly takes no arguments. This should be used by utilities wanting to see if bectl can operate on the system they're running, or with a specific root (`bectl -r`). It may grow more checks than "will libbe successfully init" in the future, but for now this is enough as that checks for the dataset mounted at "/" and that it looks capable of being a BE root (e.g. it's not a top-level dataset) bectl commands can now specify if they want to be silent, and this will turn off libbe_print_on_error so they can control the output as needed. This is already used in `bectl check`, and may be turned on in the future for some other commands where libbe errors are better suppressed as the failure mode may be obvious. Requested by: David Fullard MFC after: 3 days Notes: svn path=/head/; revision=352211
* Remove struct ata_res_pass16, unneeded after r352082.Alexander Motin2019-09-101-16/+0
| | | | | | | MFC after: 4 days Notes: svn path=/head/; revision=352200
* Stop linking to libl by specifying we do not need yywrapBaptiste Daroussin2019-09-102-1/+2
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=352130
* Initialize page/subpage in case of `modepage -d`.Alexander Motin2019-09-091-6/+7
| | | | | | | | | | | | Previously without -m parameter it worked mostly by concodence. While there, make page/subpage values validation more strict. MFC after: 5 days Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=352111
* Add one more error message to r352082.Alexander Motin2019-09-091-1/+2
| | | | | | | | MFC after: 5 days Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=352103
* bectl(8): initialize reverse earlierKyle Evans2019-09-091-3/+2
| | | | | | | | | | | | This turns into a warning in GCC 4.2 that 'reverse' may be used uninitialized in this function. While I don't immediately see where it's deciding this from (there's only two paths that make column != NULL, and they both set reverse), initializing reverse earlier is good for clarity. MFC after: 3 days Notes: svn path=/head/; revision=352092
* Fix number of problems found while testing on SAT devices.Alexander Motin2019-09-091-317/+271
| | | | | | | | | | | | | | | | | | | | | - Remove incomplete and dangerous ata_res decoding from ata_do_cmd(). Instead switch all functions that need the result to use get_ata_status(), doing the same, but more careful, also reducing code duplication. - Made get_ata_status() to also decode fixed format sense. In many cases it is still not enough to make it useful, since it can only report results of 28-bit command, but it is slightly better then nothing. - Organize error reporting in ata_do_cmd(), so that if caller specified AP_FLAG_CHK_COND, it is responsible for command errors (non-ioctl ones). - Make HPA/AMA errors not fatal for `identify` subcommand. - Fix reprobe() not being called on HPA/AMA when in quiet mode. - Remove not very useful messages from `format` and `sanitize` commands with -y flag. Once they started, they often can't be stopped any way. MFC after: 5 days Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=352082
* mount_fusefs: fix a segfault on memory allocation failureAlan Somers2019-09-071-0/+2
| | | | | | | | | | Reported by: Coverity Coverity CID: 1354188 MFC after: 4 days Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=352025
* Unify cam_send_ccb() error reporting.Alexander Motin2019-09-073-126/+17
| | | | | | | | | | | | Error there mean that command was not even executed, and all information we have about it is errno, and cam_error_print() call is not very useful. Plus it is most likely a programmatic error, that shoud not happen. MFC after: 1 week Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=352018
* Supply SAT layer with valid transfer sizes.Alexander Motin2019-09-072-171/+135
| | | | | | | | | | | | | | | | | | | | This is a rework of r344701, that noticed that number of bytes passes to 8 bit sector count field gets truncated. First decision was to not pass anything, since ATA specs define the field as N/A. But it appeared to be a problem for some SAT devices, that require information about data transfer to operate properly. Some additional investigation shown that it is quite a common practice to set unused fields of ATA commands (fortunately ATA specs formally allow it) to supply the information to SAT layer. I have found SAS-SATA interposer that does not allow pass-through without it. As side effect, reduce code duplication by removing ata_do_28bit_cmd() function, replacing it with more universal ata_do_cmd(). MFC after: 1 week Sponsored by: iXsystems, Inc. Notes: svn path=/head/; revision=352011
* Fix typo not -> nor and add 'the' because we are talking about specific flagsWarner Losh2019-09-061-2/+2
| | | | | | | | | | and make the punctuation parallel between the three cases. Submitted by: Yoshihiro Ota-san Differential Revision: https://reviews.freebsd.org/D21530 Notes: svn path=/head/; revision=351936
* pkgbase: pfctl: tests: Put tests files in the FreeBSD-tests packageEmmanuel Vadot2019-09-052-0/+4
| | | | | | | | Reviewed by: kp, gjb Differential Revision: https://reviews.freebsd.org/D21521 Notes: svn path=/head/; revision=351862
* pkgbase: Create a FreeBSD-utilities package and make it the default oneEmmanuel Vadot2019-09-054-4/+1
| | | | | | | | | | | | | The default package use to be FreeBSD-runtime but it should only contain binaries and libs enough to boot to single user and repair the system, it is also very handy to have a package that can be tranform to a small mfsroot. So create a new package named FreeBSD-utilities and make it the default one. Also move a few binaries and lib into this package when it make sense. Reviewed by: bapt, gjb Differential Revision: https://reviews.freebsd.org/D21506 Notes: svn path=/head/; revision=351858
* pkgbase: Move rc scripts and related files to their own packagesEmmanuel Vadot2019-09-051-1/+1
| | | | | | | | | | | | It doesn't need to be in runtime and might help people who want to experiment with other rc system or don't use one (like in small embedded mfsroot). Reviewed by: bapt, gjb Differential Revision: https://reviews.freebsd.org/D21499 Notes: svn path=/head/; revision=351851
* Report the Host Buffer Memory minimum and preferred sizes.Warner Losh2019-09-041-0/+2
| | | | | | | | | | The Host Buffer feature (NVMe 1.4 section 89) allows for the NVMe card request the host provide it buffer for lookaside tables and maybe other things. Report the card's minimum and preferred sizes with nvmecontrol/camcontrol identify. Notes: svn path=/head/; revision=351824
* bectl(8): implement sorting for 'bectl list' outputKyle Evans2019-09-043-40/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow 'bectl list' to sort output by a given property name. The property name is passed in using a command-line flag, '-c' for ascending order and '-C' for descending order. The properties allowed to sort by are: - name (the default output, even if '-c' or '-C' are not used) - creation - origin - used - usedds - usedsnap - usedrefreserv The default output for 'bectl list' is now ascending alphabetical order of BE name. To sort by creation time from earliest to latest, the command would be 'bectl list -c creation' Submitted by: Rob Fairbanks <rob.fx907 gmail com> Reviewed by: ler MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D20818 Notes: svn path=/head/; revision=351813
* Correct overflow logic in fullpath().Xin LI2019-09-041-9/+13
| | | | | | | | Obtained from: OpenBSD MFC after: 3 days Notes: svn path=/head/; revision=351802
* Remove unneeded blank line. No functional change.Xin LI2019-08-301-1/+0
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=351623
* ping: raise WARNS level to 6Alan Somers2019-08-271-1/+0
| | | | | | | | | | Submitted by: Ján Sučan <sucanjan@gmail.com> MFC after: 2 weeks Sponsored by: Google LLC (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21405 Notes: svn path=/head/; revision=351548
* Add kernel-side support for in-kernel TLS.John Baldwin2019-08-272-2/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | KTLS adds support for in-kernel framing and encryption of Transport Layer Security (1.0-1.2) data on TCP sockets. KTLS only supports offload of TLS for transmitted data. Key negotation must still be performed in userland. Once completed, transmit session keys for a connection are provided to the kernel via a new TCP_TXTLS_ENABLE socket option. All subsequent data transmitted on the socket is placed into TLS frames and encrypted using the supplied keys. Any data written to a KTLS-enabled socket via write(2), aio_write(2), or sendfile(2) is assumed to be application data and is encoded in TLS frames with an application data type. Individual records can be sent with a custom type (e.g. handshake messages) via sendmsg(2) with a new control message (TLS_SET_RECORD_TYPE) specifying the record type. At present, rekeying is not supported though the in-kernel framework should support rekeying. KTLS makes use of the recently added unmapped mbufs to store TLS frames in the socket buffer. Each TLS frame is described by a single ext_pgs mbuf. The ext_pgs structure contains the header of the TLS record (and trailer for encrypted records) as well as references to the associated TLS session. KTLS supports two primary methods of encrypting TLS frames: software TLS and ifnet TLS. Software TLS marks mbufs holding socket data as not ready via M_NOTREADY similar to sendfile(2) when TLS framing information is added to an unmapped mbuf in ktls_frame(). ktls_enqueue() is then called to schedule TLS frames for encryption. In the case of sendfile_iodone() calls ktls_enqueue() instead of pru_ready() leaving the mbufs marked M_NOTREADY until encryption is completed. For other writes (vn_sendfile when pages are available, write(2), etc.), the PRUS_NOTREADY is set when invoking pru_send() along with invoking ktls_enqueue(). A pool of worker threads (the "KTLS" kernel process) encrypts TLS frames queued via ktls_enqueue(). Each TLS frame is temporarily mapped using the direct map and passed to a software encryption backend to perform the actual encryption. (Note: The use of PHYS_TO_DMAP could be replaced with sf_bufs if someone wished to make this work on architectures without a direct map.) KTLS supports pluggable software encryption backends. Internally, Netflix uses proprietary pure-software backends. This commit includes a simple backend in a new ktls_ocf.ko module that uses the kernel's OpenCrypto framework to provide AES-GCM encryption of TLS frames. As a result, software TLS is now a bit of a misnomer as it can make use of hardware crypto accelerators. Once software encryption has finished, the TLS frame mbufs are marked ready via pru_ready(). At this point, the encrypted data appears as regular payload to the TCP stack stored in unmapped mbufs. ifnet TLS permits a NIC to offload the TLS encryption and TCP segmentation. In this mode, a new send tag type (IF_SND_TAG_TYPE_TLS) is allocated on the interface a socket is routed over and associated with a TLS session. TLS records for a TLS session using ifnet TLS are not marked M_NOTREADY but are passed down the stack unencrypted. The ip_output_send() and ip6_output_send() helper functions that apply send tags to outbound IP packets verify that the send tag of the TLS record matches the outbound interface. If so, the packet is tagged with the TLS send tag and sent to the interface. The NIC device driver must recognize packets with the TLS send tag and schedule them for TLS encryption and TCP segmentation. If the the outbound interface does not match the interface in the TLS send tag, the packet is dropped. In addition, a task is scheduled to refresh the TLS send tag for the TLS session. If a new TLS send tag cannot be allocated, the connection is dropped. If a new TLS send tag is allocated, however, subsequent packets will be tagged with the correct TLS send tag. (This latter case has been tested by configuring both ports of a Chelsio T6 in a lagg and failing over from one port to another. As the connections migrated to the new port, new TLS send tags were allocated for the new port and connections resumed without being dropped.) ifnet TLS can be enabled and disabled on supported network interfaces via new '[-]txtls[46]' options to ifconfig(8). ifnet TLS is supported across both vlan devices and lagg interfaces using failover, lacp with flowid enabled, or lacp with flowid enabled. Applications may request the current KTLS mode of a connection via a new TCP_TXTLS_MODE socket option. They can also use this socket option to toggle between software and ifnet TLS modes. In addition, a testing tool is available in tools/tools/switch_tls. This is modeled on tcpdrop and uses similar syntax. However, instead of dropping connections, -s is used to force KTLS connections to switch to software TLS and -i is used to switch to ifnet TLS. Various sysctls and counters are available under the kern.ipc.tls sysctl node. The kern.ipc.tls.enable node must be set to true to enable KTLS (it is off by default). The use of unmapped mbufs must also be enabled via kern.ipc.mb_use_ext_pgs to enable KTLS. KTLS is enabled via the KERN_TLS kernel option. This patch is the culmination of years of work by several folks including Scott Long and Randall Stewart for the original design and implementation; Drew Gallatin for several optimizations including the use of ext_pgs mbufs, the M_NOTREADY mechanism for TLS records awaiting software encryption, and pluggable software crypto backends; and John Baldwin for modifications to support hardware TLS offload. Reviewed by: gallatin, hselasky, rrs Obtained from: Netflix Sponsored by: Netflix, Chelsio Communications Differential Revision: https://reviews.freebsd.org/D21277 Notes: svn path=/head/; revision=351522
* Comment boot block checks and perform additional sanity checks:Xin LI2019-08-261-62/+109
| | | | | | | | | | | | | | | | | | | | | | | The following checks are now being enforced: - bpbBytesPerSec: only accept 512, 1024, 2048 and 4096. - bpbSecPerClust: only accept 1, 2, 4, 8, 16, 32, 64 and 128. - bpbResSectors: require non-zero. - bpbFATs: require non-zero. - bpbSectors: require zero for FAT32. - bpbFATsmall: require zero for FAT32. - bpbHugeSectors: require non-zero for FAT32. Bail out if the BPB contained values that do not meet these requirements. We also require FATsecs * FATsecs to not overflow 32-bit unsigned integer. Check for backup boot block was removed because the checker does not take corrective action, and msdosfs driver ignores it too. Notes: svn path=/head/; revision=351502
* ping: fix unaligned access to ancillary dataAlan Somers2019-08-241-3/+2
| | | | | | | | | | | | | Use CMSG_FIRSTHDR rather than assume that an array is correctly aligned. Fixes warnings on sparc64 and powerpcspe. Submitted by: Ján Sučan <sucanjan@gmail.com> MFH: 2 weeks Sponsored by: Google LLC (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21406 Notes: svn path=/head/; revision=351461
* ping: Fix alignment errorsAlan Somers2019-08-231-98/+104
| | | | | | | | | | | | This fixes -Wcast-align errors when compiled with WARNS=6. Submitted by: Ján Sučan <sucanjan@gmail.com> MFC after: 2 weeks Sponsored by: Google LLC (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21327 Notes: svn path=/head/; revision=351440
* ping: fix include guard symbol name to reflect the header file nameAlan Somers2019-08-231-2/+2
| | | | | | | | | | | Submitted by: Ján Sučan <sucanjan@gmail.com> MFC after: 2 weeks MFC-With: 351171 Sponsored by: Google LLC (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21374 Notes: svn path=/head/; revision=351424
* ping6: Rename options for better consistency with pingAlan Somers2019-08-235-63/+63
| | | | | | | | | | | | | Now equivalent options have the same flags, and nonequivalent options have different flags. This is a prelude to merging the two commands. Submitted by: Ján Sučan <sucanjan@gmail.com> MFC: Never Sponsored by: Google LLC (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21345 Notes: svn path=/head/; revision=351423
* ping: By default, don't reverse lookup IP addressesAlan Somers2019-08-223-7/+10
| | | | | | | | | | | | | | | | | ping's default is now not to attempt reverse DNS lookups. The -H flag will enable them. This change is not quite a reversion of r351330. That change made the happy path and error path do reverse lookups consistently; this change changes the default for both paths. Submitted by: Ján Sučan <sucanjan@gmail.com> Discussed with: cem MFC after: 2 weeks MFC-With: 351330 Sponsored by: Google LLC (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21364 Notes: svn path=/head/; revision=351398
* ping6: add a basic functional testAlan Somers2019-08-224-0/+70
| | | | | | | | | | Submitted by: Ján Sučan <sucanjan@gmail.com> MFC after: 2 weeks Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21292 Notes: svn path=/head/; revision=351394
* ping: add a basic functional testAlan Somers2019-08-223-0/+66
| | | | | | | | | | Submitted by: Ján Sučan <sucanjan@gmail.com> MFC after: 2 weeks Sponsored by: Google, inc. (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21289 Notes: svn path=/head/; revision=351393
* When creating a new FAT32 filesystem, use "unknown" (0xFFFFFFFF) forXin LI2019-08-221-1/+1
| | | | | | | | | | | | FSI_Nxt_Free instead of providing a wrong value. With this change, fsck_msdosfs would no longer complain about invalid FSInfo information. MFC after: 2 weeks Notes: svn path=/head/; revision=351382
* ping: add -H option for enabling reverse DNS lookupAlan Somers2019-08-212-6/+17
| | | | | | | | | | | This is the reverse of the -n flag. Submitted by: Ján Sučan <sucanjan@gmail.com> Sponsored by: Google LLC (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21356 Notes: svn path=/head/; revision=351354
* ping: do reverse DNS lookup of the target addressAlan Somers2019-08-211-2/+1
| | | | | | | | | | | | | | | When printing replies, ping will now attempt a reverse DNS lookup of the target. That can be suppressed by using the "-n" option. Curiously, ping has always done reverse lookups in certain error paths, but never in the success path. Submitted by: Ján Sučan <sucanjan@gmail.com> MFC after: 2 weeks Sponsored by: Google LLC (Google Summer of Code 2019) Differential Revision: https://reviews.freebsd.org/D21351 Notes: svn path=/head/; revision=351330